Solved

Using SQL or SSIS to Parse Variable Length Records by Sections

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS SQL with ODBC 5 35
Attaching Database Failed ? 3 39
Deal with apostrophe in stored procedures 8 41
T-SQL: New to using transactions 9 21
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

785 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