Have the below SQL. I am getting an error message saying 'There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement'
CREATE TABLE #CaseList (
ID INT IDENTITY(1, 1) NOT NULL,
CaseNumber BIGINT NOT NULL,
ErrorReason VARCHAR(250) NOT NULL
)
SELECT * FROM #CaseList
SET IDENTITY_INSERT #CaseList ON
INSERT INTO #CaseList (ID, CaseNumber, ErrorReason)
VALUES (
1, 191541724, '',
2, 191546004, '',
3, 191547177, '',
4, 191549409, '',
5, 191551441, ''
)
SET IDENTITY_INSERT #CaseList OFF
Not sure what I am missing here since the number of my values matches with my temp table definition .. Thx :)