That worked well, but with the code in message #
1239555 I have got the elements into individual cursors. I also am creating a data dictionary to get the data from the cursors into the application base tables. Would you look at it to see if there is anything that strikes you as really odd or that maybe I've missed something major? I know that I'm going to have parse apart the elements that contain the "^" delimiters as they might also be broken up in our data (like "Jay^Johengen for FName and LName).
>From my and others help, I believe you are on the right road.
>
>By the way, your problem intrigued me last night. I throw together a snip of code that parse the HL7 stream (include all five levels of nesting). It crude, but I hope it leads you in the right direction. (P.S. I left off when I discovered it was skipping the first element of each level, I think.)