lexical references in oracle 10g reports [message #342030] |
Thu, 21 August 2008 02:12 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #344438 is a reply to message #342030] |
Fri, 29 August 2008 16:06 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 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 likeSELECT ordid, total
FROM this_view
WHERE table_name = :par_table_name
|
|
|