Re: parsing file before inserting into table
From: Ilya Margolin (ilya_no_spam__at_unapen.com)
Date: 12/13/04
- Next message: FRED: "Re: parsing file before inserting into table"
- Previous message: Joachim Hofmann: "Database Table Maintanance by Text File"
- In reply to: FRED: "parsing file before inserting into table"
- Next in thread: FRED: "Re: parsing file before inserting into table"
- Reply: FRED: "Re: parsing file before inserting into table"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 13 Dec 2004 08:55:28 -0500
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@discussions.microsoft.com> wrote in message
news:8211AC84-6C30-4CD1-A426-008854D4FD5D@microsoft.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
>
- Next message: FRED: "Re: parsing file before inserting into table"
- Previous message: Joachim Hofmann: "Database Table Maintanance by Text File"
- In reply to: FRED: "parsing file before inserting into table"
- Next in thread: FRED: "Re: parsing file before inserting into table"
- Reply: FRED: "Re: parsing file before inserting into table"
- Messages sorted by: [ date ] [ thread ]