![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm beginer (ACCESS developer wanting to learn SQL) with DTS and I would like to parse the TXT file I'm importing before I insert data into my SQL 7.0 table. I have the following report that I receive each month and I would like to import the detail not the header of the report. text file look like this: -------------------------------------------------------------------------- ------- page1 amortization report 12/10/2004 for branch 9125 bidon cie code asset# descr dep meth book val dep val T 390000 Dell server SLN 12,000.25 4,500.35 U 580000 Building SLD 50,000.36 49,000.36 ..... page2 amortization report 12/10/2004 for branch 9125 bidon cie code asset# descr dep meth book val dep val T 391000 Workstation SLN 2,000.25 500.35 U 588000 Loader SLD 30,000.36 29,000.36 End of the report -------------------------------------------------------------------------- --------- the data I want to insert are: char char char char reel reel T 390000 Dell server SLN 12,000.25 4,500.35 U 580000 Building SLD 50,000.36 49,000.36 T 391000 Workstation SLN 2,000.25 500.35 U 588000 Loader SLD 30,000.36 29,000.36 I went in transformation tab but was unable to figure out VBScript to skip the header and footer lines so I get type mismatch importing error. Could anybody help with that easy one ? FRED |
#3
| |||
| |||
|
|
Fred, What you want to do here is configure the file connection as having one big column. The activeX transformation should then be something like: If Left(DTSSource("<..>"), 1) = "T" Or Left(DTSSource("<..>"), 1) = "U" Then 'code to split record into separate destination columns goes here Main = DTSTaskExecResult_Success Esle Main = DTSTransformStat_SkipRow End If Ilya "FRED" <FRED (AT) discussions (DOT) microsoft.com> wrote in message news:8211AC84-6C30-4CD1-A426-008854D4FD5D (AT) microsoft (DOT) com... I'm beginer (ACCESS developer wanting to learn SQL) with DTS and I would like to parse the TXT file I'm importing before I insert data into my SQL 7.0 table. I have the following report that I receive each month and I would like to import the detail not the header of the report. text file look like this: -------------------------------------------------------------------------- ------- page1 amortization report 12/10/2004 for branch 9125 bidon cie code asset# descr dep meth book val dep val T 390000 Dell server SLN 12,000.25 4,500.35 U 580000 Building SLD 50,000.36 49,000.36 ..... page2 amortization report 12/10/2004 for branch 9125 bidon cie code asset# descr dep meth book val dep val T 391000 Workstation SLN 2,000.25 500.35 U 588000 Loader SLD 30,000.36 29,000.36 End of the report -------------------------------------------------------------------------- --------- the data I want to insert are: char char char char reel reel T 390000 Dell server SLN 12,000.25 4,500.35 U 580000 Building SLD 50,000.36 49,000.36 T 391000 Workstation SLN 2,000.25 500.35 U 588000 Loader SLD 30,000.36 29,000.36 I went in transformation tab but was unable to figure out VBScript to skip the header and footer lines so I get type mismatch importing error. Could anybody help with that easy one ? FRED |
![]() |
| Thread Tools | |
| Display Modes | |
| |