Oracle Pattern Matching(regexp_like) for csv
978906Dec 19 2012 — edited Dec 19 2012I have a table offer_detail which contains columns like
Offer_ID Customer_IDS
EF123 100,200,300
EF124 300,700,800
I am writing a query which will have customer id as a paramter. Based on the customer id the results are to filtered.For eg if the input customer id is 100, I should be getting the all the offer_ids that contain the customer id in csv.
I tried using regexp_like function
select offer_id from offer_detail where regexp_like(customer_ids,':INPUT_PARAMETER')It works fine if the paramter is a single value, If the parameter contains multiple values, then this does not work. Is there any work around? Kindly Help. I am using Oracle 11g.