I pulled some data in using the import utility and place the data into results. I add a couple columns with default values to match the table I want to merge the data to. The receiving table has an identity column and I have tried different approaches to get data into the receiving table, but with failure. I finally just drop that first column, load the data and then recreate the identity column and re-establish relationships. What am I missing? I looking forward to learn a new trick.
If you need to insert values into an IDENTITY column, you first need to SET IDENTITY_INSERT ON. Then SQL Server will allow you to insert that column as well.
Dig Deeper on Microsoft SQL Server Performance Monitoring and Tuning
Related Q&A from Greg Low
Should developers be granted permissions to production queue in a SQL Server environment? See why expert Greg Low suggests proc access by WITH ...
Find how to save stored procedure output to the network drive via SQL Server Management Studio.
Find how to query in SQL Server to get all database names created by users.
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.