INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Find String in unformatted flat file

Find String in unformatted flat file

(OP)
SSIS 05

Hi All,
I am trying to find a string "BOS" in a un-formatted flat file (it's a generated log file .txt), using SSIS to automate it. It doesn't have comma's or tab spacing it only has [CR LF]. So the data gets imported as one column with many rows and the odd empty row. I then use a conditional split to search for the string but all the rows end up going to the default output. When I use a plain text file with just the string the package works fine. But when I use log file it doesn't find.

Is it possible to use a UN-formatted flat file in SSIS and if so how?

Conditional split code:

Order 1, FINDSTRING("BOS",[Copy of Column 0],1)>0

Order 2, [Copy of Column 0] == "BOS" || SUBSTRING([Copy of Column 0],1,500)=="BOS"

File:

Begin Processing of excel file: Phils Inc.xls 31-08-12 08-16-58 CRLF
Excel File: Phils Inc.xls opened successfullyCRLF
WorkSheet set successfullyCRLF
Header row loaded successfullyCRLF
Mapping established beginning processing of invoicesCRLF
CRLF
Processing Invoice: 8957CRLF
Processing LineItem: 1, Line Reference: , Excel Row: 2CRLF
The following Invoice: 8957 could not be processed due to An error has occurred intialising the BOS object. For further information please see the attached error.CRLF
The following LineItem: 1, Line Reference: , Excel Row: 2 could not be processed due to An error has occurred intialising the BOS object. For further information please see the attached error.CRLF
CRLF
Processing Invoice: 019CRLF
Processing LineItem: 1, Line Reference: , Excel Row: 3CRLF
The following Invoice: 019 could not be processed due to An error has occurred intialising the BOS object. For further information please see the attached error.CRLF
The following LineItem: 1, Line Reference: , Excel Row: 3 could not be processed due to An error has occurred intialising the BOS object. For further information please see the attached error.CRLF
CRLF
Processing Invoice: 007895CRLF
Processing LineItem: 1, Line Reference: 20059, Excel Row: 4CRLF
Processing LineItem: 2, Line Reference: 20057, Excel Row: 5CRLF
The following Invoice: 007895 could not be processed due to An error has occurred intialising the BOS object. For further information please see the attached error.CRLF
The following LineItem: 1, Line Reference: 20059, Excel Row: 4 could not be processed due to An error has occurred intialising the BOS object. For further information please see the attached error.CRLF
The following LineItem: 2, Line Reference: 20057, Excel Row: 5 could not be processed due to An error has occurred intialising the BOS object. For further information please see the attached error.CRLF
CRLF

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close