locked
Why am I getting this error message when I go to execute my query? RRS feed

  • Question

  • User1938579050 posted

    Does anyone know why I'm getting this error message when I go to execute my query?

    Saturday, January 11, 2020 12:50 PM

Answers

  • User-719153870 posted

    Hi Joe_p123,

    Seems you are inserting values to identity field [Booking ID].

    An identity filed means it will grow automatically based on its seed and increment, its value can not be set unless you SET Identity_insert.

    In my opinion, you can just ignore its value:

    insert into dbo.booking values('1','1','19 12 20','07:00 - 17:00','Morning f12+2')

    For more information about insert in SQL Server: The SQL INSERT INTO Statement.

    In addition, please mark the post which helped solve your problem as the answer so that it could help more people who met the same problem.

    Best Regard,

    Yang Shen

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 13, 2020 9:19 AM

All replies