Unix Technical Forum

using DTS question

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 ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 06:24 AM
wireless200@yahoo.com
 
Posts: n/a
Default using DTS question

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com