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
張貼者: Brian 於 14:24
標籤: Sql Server
Subscribe to:
Post Comments (Atom)
0 意見:
Post a Comment