Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Setting bind variables or defines from applications?
I am just researching if this could be useful in our application. Right
now we have differerent output sets (tables named SoAndSo_001,
SoAndSo_002, etc), because our clients do not have partitioning
licenses (and I know this sucks).
Anyway, what we do quite a lot in the code is create SQL statements that reference the particular output set table (SoAndSo_005, for example). To use another output set we have to change this value in the SQL statement. As far as I know, a table name cannot be passed in as a parameter to Oracle (9.2).
What I can do in SQL+ is define a string as:
define TR = 'TRAIN_ROUTE'
and then use this in SQL statements:
select count(*) from &TR;
COUNT(*)
31535
1 row selected.
Now, what I really would love is to be able to set a define in my application, to point to the current output set, and then not have to send in the output set to all the SQL statements we generate.
Sorry for the above, I realize now that its not bind variables, but definitions.
Thanks for any help,
Dean
(ps we cannot create views).
Received on Thu Apr 20 2006 - 16:51:54 CDT
![]() |
![]() |