Solved

Using SQL or SSIS to Parse Variable Length Records by Sections

Posted on 2009-03-31
3
505 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

707 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

18 Experts available now in Live!

Get 1:1 Help Now