Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2010
    Posts
    26

    Unanswered: SSIS (SQL SERVER 2008 R2) parse SQL Query result with delimiter

    Hi Everyone! First time poster here.

    I am very new to everything about SQL, by the way, and this is my first experience with SSIS as well.

    I have an SQL query (I am using Query builder in SSIS) which has an output of one string of text per row, each of which has delimiters in it. Specifically, the '|' character. Since I am very new to SSIS I am trill finding my way around - any hints as to how I can parse this string via the delimiter, so that it splits into new rows?

    EX:

    col1:
    a|b|c
    d|e|f


    AFTER SPLITTING:

    col1:
    a
    b
    c
    d
    e
    f

    Thanks!

    Dustin

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10

  3. #3
    Join Date
    Aug 2010
    Posts
    26
    Thanks George - though its not quite what I'm looking for. I am able to parse, but if you pass it a column, then the solutions you directed me to only parse the last row given. Thus I would need wither a "For each row, do this parsing function" or (what I did) was to use the COALESCE function, and made all of my rows into one, then parsed that.

    This is probably not the most efficient way it can be done, but this will not be run for many records at all, so efficiency is not our main concern here, just functionality.

    So the steps are:

    Initial Table:

    col1:
    a|b|c
    d|e|f

    Coalesce:

    col1:
    a|b|c|d|e|f

    Parse:
    a
    b
    c
    d
    e
    f

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •