• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 533
  • Last Modified:

Using SQL or SSIS to Parse Variable Length Records by Sections

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
healthcheckinc
Asked:
healthcheckinc
1 Solution
 
PedroCGDCommented:
You want to split each row into 2 sections?
Gave us the input and output example data or files.
Regards,
pedro

0
 
reb73Commented:
You could consider importing the whole row into a staging table with one varchar(MAX) column and handle the parsing using TSQL..
0
 
healthcheckincAuthor Commented:
thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now