Import Fixed Length Cols w/out BCP | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Import Fixed Length Cols w/out BCP

I have to import an ASCII file from a Unix server where each row has fixed-width columns instead of delimiters. From reading about DTS, I know I should normally use a bulk copy or bulk insert. However, in this case, the columns in the input file don’t match the columns in my table (the table has more columns than in the input file). Therefore, it appears I have to do a transformation. My question: How do I refer to fixed length columns when creating the Transform Data Task? Do I just load each row into a large array (using VBScript) and then say: DTSDestination("SomeColumn") = arrayElementsThatHoldThatColumn Sorry if this is a stupid question but I’m in way over my head. This is my first experience with DTS _and_ I don’t know VBScript. Thanks.
May search underhttp://www.sqldts.com for any code examples. _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

]]>