I’m curious about the error I just got after inserting this data, like so:
insert into bi_sessions
values (295377778, '04dzzzf7-e66c-4e6d-9c42-465a16546e34', 1, 43223810, 48, 1043, 'BELGIUM BEER Survey (QA)', 54, 'Synovate Panel', -1 , 2.5, 6, 3, 2.5 , 2.5, '2010-04-01 00:00:00.000', '2010-04-01 00:00:30.000', -1 ,3, 1, '000708c8507696c06f777', '68.200.93.212', 20, '04dea8f7-e66c-4e6d-9c42-465a16546777' , -1, NULL, 55743 ,9 , 'Untargeted', 3, 2, 2016, 'General', 1966, '2010-04-01 00:00:22.000', 1966, '2010-04-01 00:00:32.000', 1, 9, 'English - United States', 'Federated Sample', 1)
The error message reads:
An explicit value for the identity column in table ‘sessions’ can only be specified when a column list is used and IDENTITY_INSERT is ON.
It’s confusing – what is an identity column ?
Your table has an identity column, meaning that you have a column that automatically increment its value when a row is inserted. Since this is, well, automatic, you can’t explicitely insert a value into that column unless you use
SET IDENTITY_INSERT ON. So, in your case, you shoul do: