SELECT INTO Statement

P

Peter Farren

In Access XP I have merged two tables into a third one using the SELECT INTO
construction. Access changes the respective AutoNumber PK columns’ Indexed
property to False which allows duplicate values. Since I wish to have a
unique identifier column, I used the ALTER TABLE construct to ADD a COUNTER
data type, but since the original PK column retains the AutoNumber type, this
is not possible. I have stayed with the DAO 3.6 Library, so can’t change the
existing AutoNumber Column’s datatype). Is there a workaround for this ?
 
A

Allen Browne

Create a copy of the table without the data:
1. Select the table in the Database Window.
2. Copy (Ctrl+C)
3. Paste (Ctrl+V), and answer the dialog:
Structure only.

Now verify that the structure is exactly as you wish, and populate the table
using Append queries instead of Make Table queries.
 
Top