1. "charindex('Taiwan',description)" can be act as instr.
2. "case WHEN charindex('Taiwan',description) > 0 then 'Taiwan Local' else 'Other contury' end as location" can be act as decode.
3. full sql is like :
select mac,description,case WHEN charindex('Taiwan',description) > 0 then 'Taiwan Local' else 'Other contury' end as location from tmpdata
Feb 22, 2011
SQL Server using decode / instr function
標籤: Sql Server
Subscribe to:
Posts (Atom)