Friday, January 18, 2008

What is a Lexical Parameter

Lexical parameters are used to substitute multiple values at runtime and are identified by a preceding ‘&’. Lexical s can consist of as little a one line where clause to an entire select statement
Lexical Parameters are used to execute query dynamically.
Example: An example of a lexical parameter usage in a select statement is as follows
Select * from XX_table, XX_table 2
&where.
In the properties of the ‘where’ user parameter, make sure that the data type of the ‘where’ user parameter is set as character. If you know the maximum length that your where clause is going be, you can set the width of the where parameter to be slightly greater than that number. Otherwise, set it to some number like 100. If your lexical parameter (’where’) width is not enough to hold the where condition assigned to it, you will receive one of the following errors depending on your Reports version.
REP-0450 - Unhand led exception,
and ORA-6502- PL/SQL numeric or value error.

or
REP-1401 - Fatal PL/SQL error in afterptrigger
and ORA-6502-PL/SQL numeric or value error.

No comments: