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: Dynamice SQL in Oracle

Re: Dynamice SQL in Oracle

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 13 May 2005 22:24:07 -0700
Message-ID: <1116047996.888419@yasure>


Maxim Demenko wrote:

> DA Morgan schrieb:
>

>>Maxim Demenko wrote:
>>
>>
>>>As the table t was created with execute immediate, he didn't have
>>>another choice ;-)
>>>
>>>Best regards
>>>
>>>Maxim
>>
>>
>>Actually he did. Anyone creating a table using EXECUTE IMMEDIATE has
>>a choice.
>>
>>The choice to not try to kludge SQL Server habits into Oracle and
>>to do their DDL according to "best practices" using global
>>temporary tables.
>>
>>What is, in effect, being said here is: "If I do something stupid
>>it doesn't work." And on that I will agree.

>
>
> What you wrote is just context substitution of my posting. It is
> obvious, that there are "always" a choise between static sql and dynamic
> sql. It is obvious that static sql is mostly to prefer ( at least on
> Oracle databases). The meaning of my remark was: If you create a table
> within an plsql block by dynamic sql and you *have* to do an insert in
> *this* table in the *same* block - you have no another choice as to do
> it by dynamic sql too - as contradiction to previous posting. If my
> message was unambiguously, i'm sorry, i'll try to improve my english.
>
> Best regards
>
> Maxim

True but you are ignoring the point. There is NEVER a reason do create a table within a PL/SQL block. EVER!

A sense of "needing to do so" is, by definition, a desire to do harm.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Sat May 14 2005 - 00:24:07 CDT

Original text of this message

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