none
how to combine text data rows into single row?

    Question

  • Hi!!!!

     Need some quick help on SQL.....DTS packages.

    I’ve loaded data from text files into a table which is in the following format.....

     

    Seq_No

    Row_No

    Data

    1

    1

    ABC

    2

    2

    DEF

    3

    3

    GHI

    4

    4

    JKL

    5

    1

    MNO

    6

    2

    PQR

    7

    3

    STU

    8

    4

    VWX

     

     

     

     

     

      

    Every four lines correspond to one single logical record. So, all the data in every 4 rows have to be combined into one big string which’ll then be loaded into one col of another temporary table .....structure below.....

     

    Record_No

    Data

    1

    ABCDEFGHIJKL

    2

    MNOPQRSTUVWX

     

     

     

     

     

     I’m looking for a way to achieve this WITHOUT using Cursors (as it’ll slow down performance)......

    Any suggestions will be highly appreciated.

    Friday, July 28, 2006 9:59 AM

All replies