By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

Creating duplicate data

P: n/a

I would like to duplicate distinct rows of data. Something like: I've
got one customer stored and to want to have a copy of his data, with
only the primary key being different. Only one row of data from one
table will be affected by this operation (and the second one I insert,
of course).

I thought about something like "insert into customer (select * from
customer where .....)" or "insert into customer as select ..." but
that's not working.

A solution would be of course to read all the data I need and write it
back to access with a different primary kes (I'm using Visual C++ for
that). I just guess it can be done easier with a few SQL-Statements.

Thanks for any ideas,
Christian Wirth
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Select everything but the primary key of the table and reinsert it...
ugly, but it should work.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.