![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm creating a natural key for records that are generated with a date and timestamp. The data and timestamp are in a textfile. To get a unique key the timestamp needs to be combined with a couple of other ints. Using a DTS VB script: DTSDestination("k") = DTSSource("TimeCol") + DTSSource("numbercolumn") Column k is the primary key and defined as float in the DB. However, doing it like this does this: TimeCol (say, 10:38) + numbercolumn (say, 238) = 10:38238. I would like to do something like this Cdbl(DTSSource("TimeCol") ) but this generates a type mismatch error. In excel if you put a date in a cell and change the cell format to number it converts the date to a number (julian date?). My question is how can I generate a unique key using time and integer? I could use date part and remove all the colons or slashes, then add the result but I believe this has the possibility of generating a non-unique key. Also I'm importing large amounts of data and don't want to add a processor intensive amount of code in the dts package. Any suggestions would be appreciated. -David |
![]() |
| Thread Tools | |
| Display Modes | |
| |