Hi,
I have a HistoryTable that has a Primary Key Field and is set with Identity=1, Identity Seed=1 and Identity Increment=1.
I also have an identical WorkingTable. I need to move the records from this table to the HistoryTable. When I execute this SQL Insert:
INSERT INTO HistoryTable SELECT WorkingTable.* FROM WorkingTable WHERE WorkingTable.Campaign=20
I get this error message:
"An explicit value for the identity column in table 'CompletedRecords' can only be specified when a column list is used and IDENTITY_INSERT is ON."
Is there a way to resolve this problem other than exlicitly identifying each field? The table have 100 fields (designed by the customer). I am going to automate it using VB and creating a RecordSet with thousands of records to move to the HistoryTable from the WorkingTable for a day's transaction seem not feasible.
Thanks
Mike
I have a HistoryTable that has a Primary Key Field and is set with Identity=1, Identity Seed=1 and Identity Increment=1.
I also have an identical WorkingTable. I need to move the records from this table to the HistoryTable. When I execute this SQL Insert:
INSERT INTO HistoryTable SELECT WorkingTable.* FROM WorkingTable WHERE WorkingTable.Campaign=20
I get this error message:
"An explicit value for the identity column in table 'CompletedRecords' can only be specified when a column list is used and IDENTITY_INSERT is ON."
Is there a way to resolve this problem other than exlicitly identifying each field? The table have 100 fields (designed by the customer). I am going to automate it using VB and creating a RecordSet with thousands of records to move to the HistoryTable from the WorkingTable for a day's transaction seem not feasible.
Thanks
Mike