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 eg.:
SELECT Phone FROM Contact WHERE REPLACE((Phone), ('-'), ('')) = '315961500'
, however when I pass this as a query string through the SOAP api I receive an error saying MALFORMED QUERY "expecting a right parentheses at '-'. Has anyone any solutions to my problem?