Re: Using Substitution Variable in Report Builder

From: Mark <markg_at_mymail.co.uk>
Date: 25 Mar 2002 03:05:25 -0800
Message-ID: <ddb31653.0203250305.4a371f61_at_posting.google.com>


Take a look at Lexical Parameters in Reports. Metalink and other documentation should explain sufficiently.

M

hassan_ayub_at_yahoo.com (Hassan Ayub) wrote in message news:<1df2b71.0203220658.433cd8ea_at_posting.google.com>...
> Hi there,
> How can one use the substitution variable in Report Builder at
> runtime so that the end user has
> the option of using the where clause with any field/column of his
> choice. In SQL*Plus, the follwoing
> query works fine:
>
> select empno,ename,&column_name
> from emp
> where &condition1 and &condition2
> order by &order_column;
>
> but when I uses the same syntax in the query builder of report
> builder, syntax errors are given. Any
> ideas? How can we use the same query in Report Builder? I have used
> query in Report Builder having one
> or more columns defined as bind variable so that their values are
> given at runtime having the following
> syntax:
>
> select ename,sal,job
> from emp
> where empno = :P_1;
>
> similarly I have used the follwoing query in report builder and it
> works fine for only one column:
>
> SELECT ALL EMP.ENAME, EMP.JOB, EMP.HIREDATE, EMP.SAL,emp.deptno
> FROM EMP
> &P_1
>
> if I want to add another column what will be the syntax?
>
> I want that the end user should have the option of using any
> column/field with the where clause at runtime
> so that he is not restricted to give values of only those columns
> which have been previously defined
> in the query.
>
> Thanks in advance.
>
>
> Hassan
Received on Mon Mar 25 2002 - 12:05:25 CET

Original text of this message