identity column

  • hi,

    my identity column should start with 1,1 .

    but when i insert data from package , it starts 1133.

    even if i drop table and create again and insert data from package,it starts with 1133

    any help

  • Check the source where the data is coming from in the package and your transformations, if your inserting a column from the source into the identity column in the destination it will take what ever the values are from the source, it wont start from 1.

  • Check the initial value before the insert:

    DBCC CHECKIDENT('myTable',NORESEED)

    If it is not 1, your creation script has initial value that is not 1.

    To reset identity to start from 1 use this:

    DBCC CHECKIDENT('myTable',RESEED,0)

    But it is better to fix the creation script.

    _____________________________________________________
    Microsoft Certified Master: SQL Server 2008
    XDetails Addin - for SQL Developers
    blog.sqlxdetails.com - Transaction log myths

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply