Search This Blog

Showing posts with label SQL SERVER. Show all posts
Showing posts with label SQL SERVER. Show all posts

Sunday, August 21, 2016

SQL SERVER: Cannot insert explicit value for identity column in table 'table' when IDENTITY_INSERT is set to OFF

If you faces, mentioned  kind of  problem , pls run the following :

SET IDENTITY_INSERT <Table1> ON

After running this command, you can easily insert identical table data.


SQL SERVER: SQL Server blocked access to procedure 'sys.sp_OACreate'

Run the Following commands together:

sp_configure 'show advanced options', 1  
GO   
RECONFIGURE;  
GO  
sp_configure 'Ole Automation Procedures', 1  
GO   
RECONFIGURE;  
GO   
sp_configure 'show advanced options', 1  
GO   
RECONFIGURE;



Tuesday, July 26, 2016

Create table from another table in SQL SERVER Example

To create a table from another table SQL SERVER database with all data, following example can be used:

"Select * into NewNanoTable from OldNanoTable"

Following is also used:

 "Insert into  TABLE2
SELECT *
FROM TABLE1"