My CASE Statement works fine like this:
=============== =============== =============== ============
CASE
WHEN so.PhoneNum LIKE '999%' THEN 'Chester'
END AS Company, (Works!)
=============== =============== =============== ==========
But how can I get it to work checking more than 1 instance of PhoneNum?
This doesn't work:
=============== =============== =============== =========
CASE
WHEN so.PhoneNum LIKE '999%' THEN 'City1'
WHEN so.PhoneNum LIKE '997%' THEN 'City2 '
WHEN so.PhoneNum LIKE '998%' THEN 'City3'
END AS Company, (Fails!)
=============== =============== =============== =========
This fails with an out put of "NULL"
Thanks
=============== =============== =============== ============
CASE
WHEN so.PhoneNum LIKE '999%' THEN 'Chester'
END AS Company, (Works!)
=============== =============== =============== ==========
But how can I get it to work checking more than 1 instance of PhoneNum?
This doesn't work:
=============== =============== =============== =========
CASE
WHEN so.PhoneNum LIKE '999%' THEN 'City1'
WHEN so.PhoneNum LIKE '997%' THEN 'City2 '
WHEN so.PhoneNum LIKE '998%' THEN 'City3'
END AS Company, (Fails!)
=============== =============== =============== =========
This fails with an out put of "NULL"
Thanks
Comment