troubleshooting Question

SSIS package to To load a text file( with different delimiters) :

Avatar of harry88
harry88 asked on
Programming Languages-OtherMicrosoft SQL ServerMicrosoft SQL Server 2005
5 Comments1 Solution1366 ViewsLast Modified:
Below is the sample record of  the text file.

BrackleyDE  CCND819BXRJ  CCND819BXRJ (v2.000) (CVCV0FL21/27005 201), start Thu 4/14 11:13 (linger: 2514180) -  adskflex - 64400AMECH_PP_F:  (Total of 64 licenses issued;  Total of 30 licenses in use)

--highighed fields required

The above is the row in text file.

1st delimiter is comma(see above: bolded )
Now, we have
Col1: BdrakeEX CMUNX9BXRJ  CCN41RGJLK (v2.000) (CVCV0FL21/2700501)
Col2 -- start Thu 4/14 11:13 (linger: 2514180) -  akmadas - AASDASMECH_AA_C:  (Total of 4 licenses issued;  Total of 3 licenses in use)
- required fields bolded.
I have the above record in a flat file and i need to parse the required fields into a table.I have to further split column using space delimited for COL1 --as shown above, I only want few fields from COL1. which I bolded above.
The same with the COL2. here it is dash delimited and colon Delimited
I know this can be done by adding a SCRIPT TASK in DATAFLOW of  SSIS package.

Can any one give me        C# code or .vb code to parse this into different columns of script task…which I will eventually put into a sql destination tables.
 OR else can anyone give me the script (using string functions in SSIS derived column tsak)
Col1:  BdrakeEX  CMUNX9BXRJ  CCN41RGJLK (v2.000) (CVCV0FL21/2700501)

To extract above three bolded text fields individually      

Col2 -- start Thu 4/14 11:13 (linger: 2514180) -  akmadas - AASDASMECH_AA_C:  (Total of 4 licenses issued;  Total of 3 licenses in use)

To extract above two bolded text fields individually      
OR please suggest transformations in tsql to do this.(If I stage this data as a single record in to a table on sql server)

ASKER CERTIFIED SOLUTION
8080_Diver

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros