Re: SQL statement and Oracle Reports
Date: 21 Oct 1999 02:48:03 GMT
Message-ID: <19991020224803.12834.00000239_at_ng-ft1.aol.com>
>Hi all,
>
>I need your assistance with a SQL statement to be used with parameters in
>Oracle reports.
>
>From our application, I want users to be able to optionally pass the report
>bind parameters to restrict the output. If the user elects to omit the
>parameter, the report should select all records. I have attempted to use
>both
>NVL and DECODE without success. I hope somebody can clue me in.
>
>My SQL statement is something like:
>
>Select * from table where :Event = eventnumber;
>
>I have tried NVL(:Event, '%') and similar syntax with DECODE without success.
>
>Any ideas??
>
Look in the on-line help for "lexicals". With them you can do
SELECT * FROM TABLE WHERE &MY_CLAUSE
The & indicates a lexical usage of a report parameter. Define a default value
that compiles (ie 1=1, and do that before you create the SQl statement.
Dan Hekimian-Williams Received on Thu Oct 21 1999 - 04:48:03 CEST
