Re: PL/sql question

From: Tom Best <tom.best_at_bentley.com>
Date: 2000/08/03
Message-ID: <8mcch2$j4$1_at_news.bentley.com>#1/1


Luio:

You can use dynamic SQL. In version 8.x it is easier than 7... you can use DBMS_SQL.EXECUTE and just supply the cursor ID that has been declared with the SQL string you specified below. For 7 look at the PARSE function.

BTW - your SQL is wrong... just do:

    insert into tb2 select x from tb2;

HTH,
Tom Best

luio <lctNOlcSPAM_at_hotmail.com.invalid> wrote in message news:188b57c0.bec21bc6_at_usw-ex0104-028.remarq.com...
> I now sb. has answered this question several times. But I still
> could not find the solution for my case:
>
> create table tb2(x long);
> what I want to do is that in my store procedure
>
> insert into tb2(x) select x from tb2.
>
> copy one row from tb2 to a new row.
>
> is there any simply way to do this in my store procedure?
>
> -----------------------------------------------------------
>
>
>
>
> -----------------------------------------------------------
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
>
Received on Thu Aug 03 2000 - 00:00:00 CEST

Original text of this message