excel to sql table

  • i have a table with data and the table has identity column.

    Now i need to import new data for this year by deleting the previous year data from the table.

    i am able to import using dtswizard.exe from excel but the identity number is autogenerated from the number of rows already present in the table.

    table A has 100 rows ..identity column (ID has 100)

    i need to import from excel again to start with 1 to 105 (last 5 rows are new)

    how to do it?

  • Delete the data from your table then run the following command:

    DBCC CHECKIDENT ('yourtablename', RESEED, 1);

    This will set the identity column's seed value back to 1.

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

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