This is a discussion on using DTS question within the SQL Server forums, part of the Microsoft SQL Server category; --> I've got a flat file I'm trying to use DTS to import into a sql server table. In the ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I've got a flat file I'm trying to use DTS to import into a sql server table. In the past I've always used the wizard but now I need to do a bit more transformation. Say the flat file is as follows: c1, c2, c3 102, 4, 5 905, 6, 7 I want to use c1 combined with the name of the file, which happens to be the date it was created, to create the primary (natural) key. So say the flat file is named 20050207.tfx I want to get it in the sql table as: k c1 c2 c3 20050207102 102 4 5 20050207105 905 6 7 I looked in books online and find functions such as DTSDestination("Sale_Date") = DTSSource("Sale_Date") under Using ActiveX scripts. However when I go to actually create the script in DTS designer under Active X Script Properties, these functions don't exist under the language tab. I would think something like this would work DTSDestination("k") = DTSSource("20050207" <-get file name somehow and put here)+DTSSource("c1") Any suggestions would be appreciated. -Dave |