Trouble with :system.last_query [message #186678] |
Wed, 09 August 2006 00:42  |
cewlout
Messages: 4 Registered: August 2006
|
Junior Member |
|
|
Hello all,
first of all you are my last hope to fix this I'm going slightly mad :-/
I develop applications using Forms 6i. I have a Form which fields are populated by a simple view. If I restrict the query (put something in a field) and execute the query to display data, the :system.last_query sometimes contains the correct value and sometimes it looks like Forms put in some kind of bind variables, I give you an example:
:system.last_query = select a,b,c,d from v_test where a = 'TEST'
TEST is my restriction, I put TEST in a field on Forms and run the query then -> means everything is okay and I can use it.
But the other case is:
:system.last_query = select a,b,c,d from v_test where a = :1
I did nothing else than above but now the last_query does not show 'TEST' in the where-clause but :1
Also if you restrict more it could also look like this:
:system.last_query = select a,b,c,d from v_test where a = :1 and b = :2 and c = :3 (...)
It replaces what I have put in with these strange bind-variables(?)
How can I get around this or is there a possibility to get the real content of :1, :2 etc.. to replace them? What is this :1 :2 ?
I'm going mad.. Help me )))
|
|
|
|
Re: Trouble with :system.last_query [message #186744 is a reply to message #186697] |
Wed, 09 August 2006 05:37   |
cewlout
Messages: 4 Registered: August 2006
|
Junior Member |
|
|
My problem is that I take the content of the :system.last_query and run it again for generating an excel-export. So I need the "true" query, not the query which have "placeholders" in the where-clause:
I need:
select a,b,c from x where a='TEST' (the true last_query)
and not:
select a,b,c from x where a = :1
:1 is kind of a placeholder which I do not expect. I want the true value of :1.
So either someone is able to tell me why oracle replaces true values with :1, :2, :3 in the where-clause in :system.last_query or maybe there is a function which I can pass :1 as a parameter and the get true value back.
The general question is: why is the :system.last_query unusable and does not show the real last query as it pretends to do in the docs?
|
|
|
|
|
|
|
|