How do I use IN keyword in my sql

I need to use IN keyword in a SQL for a QR report.

This is what I need to do:

Select * from customers c
where c.customer_id IN ( '&');

How does it work? I need to be able to provide one ID or multiple ID's as input. but for multiple ID's above line of SQL is throwing an error. ('ORA-01722: Invalid number')

These ID's will be comma delimited. Ex: 101, 102

Any help would be appreciated.

Thanks,
 
I think you merely need to remove the quotes:

Select * from customers c
where c.customer_id IN ()

The resulting statement will be:

Select * from customers c
where c.customer_id IN (101, 102)
 
Back
Top