Hello
for MS SQL 2000
I want to replace a value if a Code LIKE 'A%'
MyTable :
ID
Name
Code
SELECT ID, Name, Number FROM MyTable
but if Code LIKE 'A%' then Name = 'LAN'
how can i do that ?
thank youselect ID
, case when Code like 'A%'
then 'LAN'
else Name end as Name
, Number
from MyTable|||it works
thank you
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment