You need to sign in to do that
Don't have an account?
fiachra shanahan 1
"Where" clause which removes alphanumeric characters?
I would like to write a query which searches based on a telephone number through SOAP API. In the clients SOQL DB the number could contain other string characters other than numbers such as:
(028)9067333
or
(028)-9067-333
My end query idealy would search for:
WHERE Phone = '0289067333' without any of the non-alphnumeric chars.
I would normally use a custom function or stored procedure, but this is not possible i think?? I also tried the REMOVE(originalstring,replacethis,withthis) function, however when I pass this as a query string through the SOAP api I receive an error saying "expecting a right parentheses at '-'. Has anyone any solutions to my problem?
Much appreciated
(028)9067333
or
(028)-9067-333
My end query idealy would search for:
WHERE Phone = '0289067333' without any of the non-alphnumeric chars.
I would normally use a custom function or stored procedure, but this is not possible i think?? I also tried the REMOVE(originalstring,replacethis,withthis) function, however when I pass this as a query string through the SOAP api I receive an error saying "expecting a right parentheses at '-'. Has anyone any solutions to my problem?
Much appreciated
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(Phone , "(", ""), ")", ""), " ", ""), "-", ""),".", "")