Home » Developer & Programmer » Reports & Discoverer » lexical references in oracle 10g reports (release 2)
lexical references in oracle 10g reports [message #342030] Thu, 21 August 2008 02:12 Go to next message
PRAGYA.VYAS
Messages: 1
Registered: August 2008
Location: NOIDA
Junior Member
I am making an oracle 10g report and in Query Builder I tried to use lexical reference after the from clause
like

SELECT ORDID, TOTAL
FROM &ATABLE;

But it was showing me an error "invalid table name"
Can't i use a lexical reference to make me enter the table name at run time?

please help.
Re: lexical references in oracle 10g reports [message #342044 is a reply to message #342030] Thu, 21 August 2008 02:52 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Don't rate your own question before any answer. We know you are proud of it.

Carafully choose the appropriate forum. "Suggestions & Feedback" one is for "Post your feedback and suggestions here. All suggestions, feedback, comments, ideas, etc are more than welcome.". I think "Client Tools" should be a good one, doesn't it? Have a look at its definition: "Tools for executing SQL and PL/SQL commands" and now your question "I am making an oracle 10g report and in Query Builder..." Unless there is a specific forum for Query Builder, I think it is a "Client Tool" doesn't it?

Regards
Michel
Re: lexical references in oracle 10g reports [message #344438 is a reply to message #342030] Fri, 29 August 2008 16:06 Go to previous message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Obviously, you can't do that. How come you don't know the table name BEFORE executing the report?

One way to solve the problem might be to create a VIEW based on all tables that could be used in this query (using UNION) (along with the table name as a column), and use table name in report's WHERE clause. It would then be something like
SELECT ordid, total
FROM this_view
WHERE table_name = :par_table_name
Previous Topic: rep - 1219 Error
Next Topic: i want to display alphabet S in small Oval.
Goto Forum:
  


Current Time: Mon Dec 05 19:32:45 CST 2016

Total time taken to generate the page: 0.08683 seconds