|
-
Oct 11th, 2001, 01:10 PM
#1
Thread Starter
Junior Member
Insert * <> Colx
Hello,
Here is my challenge:
I want to instert records from table 1 to table 2 using the following code: (Using Access Tables)
db.Execute " Insert INTO [Table2] " _
& "IN """ & OtherDB & """ Select [Table1].* FROM [Table1]"
The problem is that the primary key in these tables is an autonumber field. Help says to exclude the autonumber field if I want it to issue a new number when I insert. How can I exclude the column w/out having to state "Select col1, col2, etc"?
Is this possible?
Any suggestions are greatly appreciated!
-
Oct 11th, 2001, 01:51 PM
#2
Addicted Member
Carrol,
Firstly, no - you must use Col1, Col2 ... etc.
Secondly, the only way you can actually "enter your own number" is to change the AutoNumber field to a standard (Long) Number field.
You can increment an AutoNumber field, though, by inserting the number you want, minus 1, into the AutoNumber field (a bit messy!).
Any help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|