Jump to content

dynamic where clause in query


ojha

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can define parameters in your report, and use the parameter in the report query.

 

For example, if you define a parameter param_report_id, your report query can be something like

 

SELECT * FROM table_name WHERE column_name = $P{param_report_id}

 

If you need to use numeric parameter, it is easier to define it as string then do

 

SELECT * FROM table_name WHERE to_char(column_name) = $P{param_report_id}

 

Hope this helps,

 

Jane

Link to comment
Share on other sites

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...