Custom Search

Wednesday, September 24, 2008

Bind parameter and Lexical parameter in Oracle Report

What are bind parameter and lexical parameter used for?

A bind reference replaces a single value or expression.To create a bind reference in a query, prefix the parameter name with a colon (:).

Example:

select value1
from test_table
where field_name = :p_b_field_name;



A lexical reference is a text string and can replace any part of a SELECT statement, such as column names, the FROM clause, the WHERE clause, or the ORDER BY clause. To create a lexical reference in a query, prefix the parameter name with an ampersand (&).

Example:

select value1
from test_table
order by &p_l_field_name ;

No comments: