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;
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 ;
Some More Articles Related To Oracle Reports:
- How To Register An Oracle Report In Oracle Applications
- Oracle Reports Interview Questions & Answers Part -2
- Oracle Reports Interview Questions & Answers Part -3
- Oracle Reports Interview Questions & Answers Part-1
- Oracle Reports Interview Questions & Answers Part-4
- Oracle Reports Interview Questions & Answers Part-5
- Oracle Reports Interview Questions & Answers Part-6
- User Exits in Oracle Reports | Oracle Reports Tutorials
COMMENTS