Hi All,



I am trying to get at some text fields from an AS400(JBA) system. the problem i'm having is that for each new line of text on AS400 it creates a new row with a line number associated in the SQL table. When trying to export to excel this causes problems because i need the text in one cell not spread over 15/20 lines.


I need to create a query/function that will concatenate the text lines together. I'm fairly new to T-SQL so could do with some help.

Example:-

ID_______TxtLn____Text
R262965 __ 1 _______ Text 1
R262965 __ 2 _______ Text 2
R262965 __ 3 _______ Text 3


What i'm aiming for is:-

ID_______ConcatText
R262965 __ Text1 Text2 Text3


Can anyone please help me or guide me towards a starting point.


Thanks