Re: copying rows

From: Uri Dimant (urid_at_iscar.co.il)
Date: 08/03/04


Date: Tue, 3 Aug 2004 09:33:14 +0200

Darren
Since you did not post DDL + sample data + expected result I assume that you
have the below structure
CREATE TABLE #Test
(
 col1 INT NOT NULL PRIMARY KEY,
 col2 CHAR(1) NOT NULL
)
GO
INSERT INTO #Test VALUES (1,'A')
INSERT INTO #Test VALUES (2,'B')
INSERT INTO #Test VALUES (3,'C')
GO
UPDATE #Test SET col2=(SELECT col2 FROM #Test WHERE col1=2)
WHERE col1=1
GO
SELECT * FROM #Test

"Darren Woodbrey" <darrenwoodbrey@hpfairfield.com> wrote in message
news:%23s2sFONeEHA.724@TK2MSFTNGP10.phx.gbl...
> I have a work order system with 6 tables. When the first asp form is
> submitted it creates a record that has an identity field in the maintable.
> it also inserts a record into the other 5 tables putting the identity
field
> in each table as the PK. The user then submits an asp form for each table
> using an update statement. Everything is working good. My problem is
when
> the user wants to enter more that one work order that is exactly the same.
> I want them to edit the master work order and when finished be able to
push
> a button and have the other child work orders update to be exactly like
the
> original. In short I need to update a record from another record in the
> same table. Is this possible?
>
>