Jump to content
We've recently updated our Privacy Statement, available here ×

If no value is passed in Multi Select Parameter, instead of showing no result the query is returning all rows of table


inform2jayant

Recommended Posts

Hi,

I'm using Multi-Select Parameter in my report and using this syntax "$X{IN, dummy, PARAM_MULTI_PROJ_ID}" in the query. 

QUERY 1:

Now this works fine if I'm put some value for this parameter and I run the report. But when I do not give any value in this parameter then instead of showing no results it simply selects all the rows of that table and provide the output which is not desired as per my requirement. Below is the query where i'm using this parameter. Please let me know if my implementation is in correct somewhere:

SELECT tab.id  AS id 
FROM my_table tab
WHERE 
$X{IN, tab.ID, PARAM_MULTI_PROJ_ID}
 
QUERY 2:
Also, Im using a separate queyr where I'm checking whether the Multi-Select parameter is null or not. Please check the below query and let me know if it is correct:
SELECT
CASE WHEN
$X{IN, 0, PARAM_MULTI_PROJ_ID}
  THEN 0
  ELSE 1
  END as filter_check
FROM DUAL

 

Thanks

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...