Solved

Using SQL or SSIS to Parse Variable Length Records by Sections

Posted on 2009-03-31
3
508 Views
Last Modified: 2013-11-18
I have a file that has 1 fixed section and 3 variable length sections and I need it broken out into 4 files.
example: account#, name, diag codes, EOS1, proc codes, EOS2, rev codes, EOR

Some records will have no codes for one or more sections so you would see:
account#, name, EOS1,EOS2, 111,222,333, EOR
account#, name, 12.3,12.5,EOS1,EOS2, 111,222,333, EOR

EOS1 = end of section 1 indicator
EOS2 = end of section 2 indicator
EOR = end of record
0
Comment
Question by:healthcheckinc
3 Comments
 
LVL 22

Accepted Solution

by:
PedroCGD earned 500 total points
ID: 24031938
You want to split each row into 2 sections?
Gave us the input and output example data or files.
Regards,
pedro

0
 
LVL 25

Expert Comment

by:reb73
ID: 24032021
You could consider importing the whole row into a staging table with one varchar(MAX) column and handle the parsing using TSQL..
0
 

Author Closing Comment

by:healthcheckinc
ID: 31564971
thx
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now