OQL where number Like

0
Hi, I'm retrieving a list via OQL where I check on a searchstring. one of the attributes which I'm searching on is of type integer. if I fill in the input searchstring then it should give all the numbers in which the string is in. example: 123 should give back 11234, 12345, 00123 like strings it should be LIKE ‘%123%’ but how can I do this for integer fields? cast(PRJ.Number as STRING) LIKE '%123%' is not working...
asked
1 answers
1

I can’t test this right now, but maybe you could look into it:

  • Select alias your cast(PRJ.Number as STRING) AS NumberString
  • Add a HAVING NumberString LIKE ‘%123%’ at the end of the statement

 

If this works make sure to add it conditionally as HAVING doesn’t reduce the selection result until after the full query before it is run, I believe.

Hope this either works or points you in a new direction to try!

answered