Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How can I TRACE my dynamic SQL sent to ORACLE SERVER?

Re: How can I TRACE my dynamic SQL sent to ORACLE SERVER?

From: Timo Haatainen <Timo.Haatainen_at_tietogroup.com>
Date: 1997/11/28
Message-ID: <347ED168.3CD2@tietogroup.com>#1/1

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 Oy
Received on Fri Nov 28 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US