0% found this document useful (0 votes)
683 views1 page

Difference Between Bind & Lexical Parameters in Reports - Oracle Apps Guy

Bind parameters are used to replace single values in SQL statements and allow the value to be passed in at runtime. Lexical parameters allow replacing entire clauses in a SQL statement and are specified with an ampersand. Bind parameters can be used anywhere in the SQL statement except the FROM clause, while lexical parameters can replace clauses after SELECT, FROM, WHERE and others.

Uploaded by

Sanjay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
683 views1 page

Difference Between Bind & Lexical Parameters in Reports - Oracle Apps Guy

Bind parameters are used to replace single values in SQL statements and allow the value to be passed in at runtime. Lexical parameters allow replacing entire clauses in a SQL statement and are specified with an ampersand. Bind parameters can be used anywhere in the SQL statement except the FROM clause, while lexical parameters can replace clauses after SELECT, FROM, WHERE and others.

Uploaded by

Sanjay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Difference Between Bind & Lexical Parameters in Reports | Oracle Ap...

1 of 1

http://www.oracleappsguy.com/2012/07/difference-between-bind-lexica...

Difference Between Bind & Lexical Parameters in Reports


Bind Parameters:
Bind references (or bind variables) are used to replace a single value in SQL or PL/SQL,
such as a character string, number, or date. Specifically, bind references may be used to
replace expressions in SELECT, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT
BY, and START WITH clauses of queries. Bind references may not be referenced in FROM
clauses or in place of reserved words or clauses. You can create a bind reference by entering
a colon (:) followed immediately by the column or parameter name. If you do not create a
column or parameter before making a bind reference to it in a SELECT statement, Report
Builder will create a parameter for you by default.
Example:
select value1
from test_table
where field_name = :p_b_field_name;
Lexical Parameters:
Lexical references are placeholders for text that you embed in a SELECT statement. You
can use lexical references to replace the clauses appearing after SELECT, FROM, WHERE,
GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH. You cannot make
lexical references in a PL/SQL statement. You can, however, use a bind reference in
PL/SQL to set the value of a parameter that is then referenced lexically in SQL.
Example:
select value1
from test_tableorder by &p_l_field_name ;

21-12-2015 17:57

You might also like