Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using SQL or SSIS to Parse Variable Length Records by Sections

Posted on 2009-03-31
3
Medium Priority
?
530 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 1500 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

972 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