?
Solved

oracle d2k- reports  using lexical parameters

Posted on 2003-02-27
1
Medium Priority
?
1,753 Views
Last Modified: 2007-12-19
can any one help me how to create lexical parameters in oracle d2k reports for writing dynamic where condition during run time.

I have tried by creating a user parameter called p_where.

Then i have written a Query as follows.
 select deptno,dname from dept
        where &p_where

But i am getting the error Invalid SQL statement
  where ==>

So Please tell me what else i have to write after creating the parameter.
ie Any Validations, any Libraries or any Before & after form triggers, I am unable to find a correct article regarding this,  Thanking u in advance.
0
Comment
Question by:sun_ora_hpt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 22

Accepted Solution

by:
Helena Marková earned 80 total points
ID: 8031897
You have to correct your query:

select deptno,dname from dept
&p_where

This is a little explanation from http://www.dulcian.com
(Conferences,Papers&Presentations):
Lexical parameters can replace all parts of the query on which the report is based

SELECT empno,ename
FROM emp
&p_where

In the example above, the lexical parameter  p_where can replace the WHERE or ORDER BY clauses or a combination of them. The lexical parameter can be built either by the application that calls the report, or by the report itself in a program unit like an AFTER-PARAMETER-FORM trigger or a formula column.

Henka
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question