PL/SQL Search for multiple strings
Posted on 2016-11-22
It has been discovered that special characters (! @ # $ % ^ & *) in the field Protocol_Name
breaks some of our code.
So effort is underway to find special characters in Protocol_Name s and work w the business to correct them.
When looking for a number in a field like PROTOCOL_ID a WHERE a statement can be employed like:
WHERE PROTOCOL_ID in (704759, 1687076, 1732188, 618246, 733428)
In looking for string is there a way of looking for multiple strings?
This works but seems awkward.
WHERE POTOCOL_NAME like ('%' || '!' || '%')
OR PROTOCOL_NAME like ('%' || '@' || '%')
OR PROTOCOL_NAME like ('%' || '# || '%')
OR PROTOCOL_NAME like ('%' || '$ || '%')
OR PROTOCOL_NAME like ('%' || '% || '%')
Is there a way of drafting a single clause, like the IN operator
for multiple numbers, that works for multiple strings?
Allen in Dallas