Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    24

    Unanswered: SET IDENTITY_INSERT ON/OFF Error

    I would like to insert an indentity column explicitly following error occurs:

    Server: Msg 544, Level 16, State 1, Line 1
    Cannot insert explicit value for identity column in table 'TableMarket' when IDENTITY_INSERT is set to OFF.


    And when I am trying to SET IDENTITY_INSERT ON, it gives following error:

    Server: Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'ON'.


    Anyone can help me please?

    P.S. I am working on SQL Server 2000

    Thanks,
    Riaz

  2. #2
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    24
    I got successful in finding correct syntax for command i.e.

    SET IDENTITY_INSERT [ database. [ owner. ] ] { table } { ON | OFF }
    :d

    Thanks anyway,
    Riaz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •