:::: MENU ::::

Attempting to add multiple identity columns to table ‘%.*ls’ using the SELECT INTO statement.

  • Jun 23 / 2009
  • 0
Data Modeling and Database Design, Data Types, dbDigger

Attempting to add multiple identity columns to table ‘%.*ls’ using the SELECT INTO statement.

The following error message
Msg 8109, Level 16, State 1, Line 1
Attempting to add multiple identity columns to table ‘%.*ls’ using the SELECT INTO statement.

is a run time error message and appears when you try to execute a SELECT INTO statement in which you try to add more than one column with the IDENTITY property to the new table by using more than one IDENTITY function call.
Every table can contain at most only one IDENTITY column. You must remove multiple IDENTITY function calls from the SELECT INTO statement. Following is an example of such ststement.

 
SELECT IDENTITY(INT, 1, 1) AS i1, IDENTITY(INT, 10, 1) AS i2  
 INTO #t  
 FROM Northwind.dbo.Orders  
 WHERE CustomerID LIKE 'B%'  
Consult us to explore the Databases. Contact us