I understand what you are trying to do now. Unfortunately, you can't do it with an INSERT statement. I was going to suggest you Create a table using the CREATE TABLE method, then just append your records into it, but that method will not allow you to create an AutoNumber field in the new table, only a Long Integer.
The only way I can think of, is to create the new table with CREATE TABLE, pull a recordset of all the records you want to append to it, then loop through it inserting each time, a sequential variable that increments each time through the loop. It can be done, but it is kinda messy.
Is this a one time deal, or something you will be doing on a regular basis? If it will be repeated, will the table get dropped and recreated, or a new table created each time. If you are interested in this way of doing it, let me know, and we can walk through it.
Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
As a matter of fact I already solve it. I created the table with the Select Into and then add the autoincrement field with an Alter Table statement.
Thanks a lot anyway.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.