Re: PL/SQL - DBMS_SQL package

From: Paul Druker <pdruker_at_metaway.com>
Date: Tue, 12 Sep 2000 23:07:52 GMT
Message-ID: <cHyv5.2033$Lh2.728090_at_typhoon.southeast.rr.com>


Hi Paul,

The problem is not with DBMS_SQL package, but with the order by clause. It cannot be used in a subquery.

HTH,
Paul

"Paul Ling" <xl2k_at_yahoo.com> wrote in message news:YHgv5.23903$KI6.2544696_at_typhoon.snet.net...
> hi, all.
>
> I am trying to use DBMS_SQL package to create a table dynamically in my
> store procedure, the code is like the following:
>
> ...
>
> sql_str = 'create table as
> select ... from x_table where ... order by ...';
>
> DBMS_SQL.PARSE(v_cursor,sql_str,DBMS_SQL.native);
>
> ...
>
> The procedure is compiled successfully, however, it runs into error if I
> execute it.
> The code runs fine if I take out the order by clause though, am I missing
> sth? Please share your experience.
>
> Thank you all in advance.
>
> Paul
>
>
>
>
Received on Wed Sep 13 2000 - 01:07:52 CEST

Original text of this message