Auto number and Junction table importing

  • Hi there,

    I am new using DTS and have a couple of basic quesitons:

    1) I tried to import a table from ACCESS which has a PK in auto number format.  When I did the DTS, I got the PK column in different order.  Did not I do the proper way or what is the good way to import auto number columns?

    2) What is the good way to import a junction table which has two auto number columns originally?

    Thanks a lot.

     

    Autumn1008

  • Does your destination table in SQL Server have primary key contraint or a clustered index on the column?  If not, the rows won't be ordered by the column. 

    I don't know what you mean by "juntion table".  The equivalent of an auto number column in SQL Server is an identity column.  You can't have more than one identity column in a table.

    Hope this helps

    Greg

    Greg

  • I think he/she has two tables with autonumbers and another one using these numbers to relate the records. Which is why it's a bit crucial to keep the numbers the same.

    The only way I can think of doing this offhand, is to add another column and copy the autonumber value to it. Then insert records to fill in the gaps in the auto number sequence. This means that the record with an autonumber of 100 will be the 100th record when sorted by the new column. Then append to sql and the autonumbers should be the same?

  • If the SQL table has an Identity field then you can import the autonumber field into it by selecting the 'Enable Identity Insert' on the Options tab of the datapump.

     

    --------------------
    Colt 45 - the original point and click interface

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

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