lexical references in oracle 10g reports [message #342030] |
Thu, 21 August 2008 02:12 |
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 |
|
Littlefoot
Messages: 21823 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
|
|
|