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

Home -> Community -> Usenet -> c.d.o.misc -> SQL: Copy rows, changing one column

SQL: Copy rows, changing one column

From: <perry_at_hem.passagen.se>
Date: Fri, 04 Jun 1999 14:37:10 GMT
Message-ID: <7j8oam$efa$1@nnrp1.deja.com>


Hi

I want to copy a few rows meeting a certain demand in a table to the same table, changing the demanded value. Like this:

col1 col2 col3 col4


v1    a     b     c
v1    d     e     f
v2    g     h     i

I want to copy these rows to the same table to:

col1 col2 col3 col4


w1    a     b     c
w1    d     e     f
w2    g     h     i

Can this be done in a single SQL insert-query or must i loop through the recordset and copy each row one at a time, changing the appropriate column?
Any suggestions?

best regards, Per.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Jun 04 1999 - 09:37:10 CDT

Original text of this message

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