Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I TRACE my dynamic SQL sent to ORACLE SERVER?
Cho YongHo wrote:
>
> Martin said -
> >Write the same string you send to the server to either a file, or a
> >temporary table is what I do.
> >Then you can copy the string to SQL Plus and see what's wrong.
> >
>
> Thanks Martin , but how can I write the query statement to a file?
> I'm using Dynamic SQL , and can I see which statement is made in Run-Time??
> I want to use different user name for TABLE A, and It looks like
> SELECT .., .... ,...
> FROM :v1.A
> with host variable v1...
> Is it right to use Dynamic SQL Type 3 for this purpose??
> and more about TRACE??
I'm afraid you can't use variable reference for tablename (or schema
owner) in FROM-clause. Placeholders are allowed for input/output,
typically for output of select-list and for input of WHERE-clause,
something like:
SELECT :out1, :out2 FROM emp WHERE deptno = :in1
Hope this helps.
-- Timo Haatainen Carelcomp Forest OyReceived on Fri Nov 28 1997 - 00:00:00 CST