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 ;

 
for Example:
 
Advertisements

About Oracle Technology Blogs
Oracle Application Development

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: