Thread: Temp Table

Temp Table

From
Bob Pawley
Date:
When I fetch a row, as in the following, how do I copy the row's data into a temporary table so that I can process it??
 
begin work;
      Declare loop_set  Cursor
       for Select  one, two, three, four, five, six, seven from loop_import
       order by loop_id ;
     fetch next From loop_set;
 
 
Bob Pawley

Re: Temp Table

From
Ron Johnson
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/19/07 11:39, Bob Pawley wrote:
> When I fetch a row, as in the following, how do I copy the row's data into a temporary table so that I can process
it??
>
> begin work;
>       Declare loop_set  Cursor
>        for Select  one, two, three, four, five, six, seven from loop_import
>        order by loop_id ;
>      fetch next From loop_set;

Wouldn't it be simpler to do:
INSERT INTO some_temp SELECT field list FROM some_table;

- --
Ron Johnson, Jr.
Jefferson LA  USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHGPp0S9HxQb37XmcRAlpUAKDTR/qG8VQxZJpt1IyqZp7l9Q+V0gCfSW54
ANpxcxz4AAOYddctMe4inJc=
=1lk2
-----END PGP SIGNATURE-----