I have this bit of code in my query, when I remove it then it works fine, if I keep it in I get a
"ORA-00908: missing NULL keyword"
message.
CASE WHEN pp.phone_number is '0' THEN ''
I have other When - Then and an END statement in there so it's not that.
The whole code, in case you wanted to see is:
CASE WHEN pp.country_code_number = 44 THEN '0'||SUBSTR(REGEXP_REPLACE(pp.phone_number, '[^0-9]+', ''),-10)
WHEN pp.country_code_number IS NULL THEN '0'||SUBSTR(REGEXP_REPLACE(pp.phone_number, '[^0-9]+', ''),-10)
WHEN pp.phone_number is '0' THEN ''
WHEN pp.phone_number is NULL THEN 'Blank'
ELSE '***ERROR***'
END
Thanks all