1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Lexical Parameter and Bind Variable in Oracle Reports

Discussion in 'Other Development Tools' started by bobbyiiit, Nov 19, 2010.

  1. bobbyiiit

    bobbyiiit Active Member

    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    85
    Lexical parameter

    These are used to replace a value dynamically at run time. Lexical parameters can dynamically replace clauses in the Select statement in the data model and even the whole select statement. It replaces any part of a SELECT statement, such as column names, the FROM clause, the WHERE clause, the ORDER BY clause.

    To create a lexical reference in a query, prefix the parameter name with an ampersand (&)


    Bind parameter

    We can create lexical parameter & bind parameter in the report in the data model query. The bind parameter is used as well and lexical parameter used for ex:

    Code (SQL):
    SELECT &deptno,ename,deptno FROM emp WHERE empno=:empno
    Code (Text):
    Lexical parameter has a PREFIX ampersand (&)
    Code (Text):
    Bind parameter has a PREFIX colon (:)
    Hope this was useful... :)
     
  2. chandresh

    chandresh Active Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    75
    Location:
    India
    hhi
    klhnfdkjshfkjdsfhduskjfb