Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8990

Re: optional command level parameters

$
0
0

Hi,

 

I tried something like below which worked for me, check it:

 

1. I created an optional command level parameter without setting default value.

2. used it in query filter where clause with content like:

            

            and (<database field name> = <parameter> or 'ALL' =  (case when <parameter> is null then 'ALL'

                                                                                           when '{?Task}' = 'ALL' then 'ALL'  end))

The second when condition is to provide an option of ALL in the filter and select all the records when the parameter is selected.

The first when clause checks if the parameter is null (not selected) then it creates a condition like 'ALL' = 'ALL', which fetches all the records.

 

Hope it helps.

 

FYI, the command query was created for Oracle database.

 

Thanks,

Raghavendra


Viewing all articles
Browse latest Browse all 8990

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>