Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SubQuery

0 views
Skip to first unread message

Eric Loew

unread,
Jun 2, 2000, 3:00:00 AM6/2/00
to
I am tying to use a Subquery with an insert Statement, with no luck.

I want to copy a record into the same table with a different ID

Example I am trying:
INSERT INTO table SELECT id = '2', field1,field2 FROM table WHERE id='1'

I know I could retrieve the record and change the id and send an insert
query back, but
I would like to avoid a round trip.

Thanks in advance,

Eric Loew
el...@documedix.com

Allan

unread,
Jun 2, 2000, 3:00:00 AM6/2/00
to
INSERT INTO
table
(
id,
field1,
field2,
)
SELECT

2,
field1,
field2
FROM
table
WHERE
id = 1

Allan

Eric Loew

unread,
Jun 2, 2000, 3:00:00 AM6/2/00
to
Thanks. THis worked just fine.
eloew

Allan <a_mit...@bgfoot.com> wrote in message
news:393800e4...@msnews.microsoft.com...

0 new messages