Code Example 1:

create table vend(v_code varchar(10) not null)

insert vend(v_code) values('TRAMI') -- All caps could be legacy data
insert vend(v_code) values('110WS')
insert vend(v_code) values('ZACCA')
insert vend(v_code) values('TowUs')
insert vend(v_code) values('TraMi') -- This column isn't unique.
insert vend(v_code) values('belso')
insert vend(v_code) values('Tax2000')
insert vend(v_code) values('Tax2000')

Code Example 2:

select *
from vend
where cast(v_code as varbinary) = cast(upper(v_code) as varbinary)

Code Example 3:

select *
from vend
where v_code = 'TraMi' -- Use an index if available. Likely superfluous with 7.0.
and cast(v_code as varbinary) = cast('TraMi' as varbinary)