I am working on a report that allows the user to define the information they receive. Normally that is not a problem when I use "like", "between","=","<",">" etc... but I am trying to use "in" so they can enter multiple items separated by a comma and also enter a nvl if the space if blank.
I would expect it to look something like this but it doesnt work.
FROM customer_order_line col
where {table Name} in
nvl(('&Order_Type','&Order_Type','&Order_Type'),'%')
That is supposed to allow them to enter the order_type field up to 3 values separated by a comma and if they leave it blank it will return all values for that parameter.
I know I could do several lines something like
{xyz table name} = nvl('&Order_type1','%') and
{xyz table name} = nvl('&Order_Type2','%') and
{xyz table name} = nvl('&Order_Type3','%') etc..
but in the selection they would get three separate fields to enter data. I would like it all combined in one so they can just enter the same info and separate it with a comma.
If you have any input I would love to hear from you. Hopefully the question makes enough sense.
I would expect it to look something like this but it doesnt work.
FROM customer_order_line col
where {table Name} in
nvl(('&Order_Type','&Order_Type','&Order_Type'),'%')
That is supposed to allow them to enter the order_type field up to 3 values separated by a comma and if they leave it blank it will return all values for that parameter.
I know I could do several lines something like
{xyz table name} = nvl('&Order_type1','%') and
{xyz table name} = nvl('&Order_Type2','%') and
{xyz table name} = nvl('&Order_Type3','%') etc..
but in the selection they would get three separate fields to enter data. I would like it all combined in one so they can just enter the same info and separate it with a comma.
If you have any input I would love to hear from you. Hopefully the question makes enough sense.