Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Record Number Column

Author  Topic 

dewacorp.alliances

452 Posts

Posted - 2008-11-06 : 22:28:13
Hi there

I have this excel file and would like to do data migration to SQL db. In the data source, there is no record number. So how do I add record number (int - 1, 2, 3 etc etc) to the database destination? Is "Derived Column" suitable for this?

BTW ... I'm quite new with SSIS.

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-07 : 00:01:31
You can use derived column. but if your attempt is just to create a unique numbered column just declare an identity column in destination table and insert the values from source. It would automatically generate values on each insertion.
Go to Top of Page

dewacorp.alliances

452 Posts

Posted - 2008-11-07 : 04:25:37
quote:
Originally posted by visakh16

You can use derived column. but if your attempt is just to create a unique numbered column just declare an identity column in destination table and insert the values from source. It would automatically generate values on each insertion.



I do have identity in destination table but I would like to add extra column in destination table that is having a sequential number (1 till whatever) so I know that if I go back I can comparing the this table and the original file.

Hope this help.

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-07 : 05:14:56
if you have an identity column whats the need of new sequential column? wont there values be always same unless you enable identity insert property and dump values to it? if its latter case, then also just keep a new identity column and dont put identity property to your current id column.
Go to Top of Page
   

- Advertisement -