Question : Insert into a table without having duplicates - I get an error now that I didn't get before

I just asked this question and I got the answer.  However I have added a new process since and I broke this.  I am asking for help.  I have the following table:

BillingArchive.dbo.ba8001 - CDRhistory with unique number

It pulls all CDR data from a read only database dump.  I am wanting to put only new records that are not already in this table:

BillingArchive.dbo.CDRHISTORY

And Insert only the new ones into this table:

BillingArchive.dbo.CDRHISTORY

Here is the link from the previous experts exchange question I asked:
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_25046435.html

I get the following error:
Msg 8101, Level 16, State 1, Line 1
An explicit value for the identity column in table 'BillingArchive.dbo.CDRHISTORY' can only be specified when a column list is used and IDENTITY_INSERT is ON.

Answer : Insert into a table without having duplicates - I get an error now that I didn't get before

The error means that you are trying to insert a value into an identity field, i.e. a field that is configured to have an incrementing int value. As it says if you actually want to do that you have to:

A) type all your fields into the insert statement e.g. instead of insert into TableA select ... you must have insert into TableA Field1, Field2... select Value1, Value2...

AND

B) set identity_insert on before the query (and for safety probably turn it off again afterwards).

For more assistance please post the exact query and the one I looked at on the other thread looked generic.
Random Solutions  
 
programming4us programming4us