Merge Multiple row into single row

  • Hi,

    I have two tables of news feed NewsHeader & NewsDetails

    NewsHeader:

    Time Header

    10:15:34 AM News1

    10:15:34 AM News1

    10:15:34 AM News1

    11:19:39 AM News2

    11:19:39 AM News2

    12:35:04 PM News3

    12:35:04 PM News3

    NewsDetails

    Time Text RowC

    10:15:34 AM ABC 1

    10:15:34 AM DEFG 2

    10:15:34 AM HIJKL 3

    11:19:39 AM AABB 1

    11:19:39 AM CCDD 2

    12:35:04 PM ZZYY 1

    12:35:04 PM XXWW 2

    If combine the 2 table into view I get:

    NewsTable:

    Time Header Text RowC

    10:15:34 AM News1 ABC 1

    10:15:34 AM News1 DEFG 2

    10:15:34 AM News1 HIJKL 3

    11:19:39 AM News2 AABB 1

    11:19:39 AM News2 CCDD 2

    12:35:04 PM News3 ZZYY 1

    12:35:04 PM News3 XXWW 2

    Required Output

    Time Header Text

    10:15:34 AM News1 ABC DEFG HIJKL

    11:19:39 AM News2 AABB CCDD

    12:35:04 PM News3 ZZYY XXWW

    Thank you.

  • Take a look at the following URL.

    http://www.sqlservercentral.com/Forums/Topic490453-8-1.aspx#bm490573

    karthik

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply