views:

62

answers:

0

I have an expression that returns the following data

ID Name Date

1 BRN 01/12/2009 00:00:00

1 BRN 01/06/2009 00:00:00

2 WTI 01/12/2009 00:00:00

2 WTI 01/06/2009 00:00:00

I'd like to add a group by ID and Name and then concat the two dates together with a hyphen seperating.

My only solution so far is to get all the data then extract the distinct list of ID's, loop that and extract from the main list the object with that ID, loop then and concat the dates.

I have a feeling that due to T-SQL no supporting a groupby concat term this wont be able to be done in the expression.

Using SQL 2005

TIA

MattC