Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible...?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Desktop
Divers
Thread ID:
01383774
Message ID:
01383779
Vues:
55
Yes, it's possible and easy to do. Give me a sec. to find relevant info.

>...given this dataset:
>
>
>RowDate	RowId	CommentID
>2/11/09	BB2	IL 5093
>2/11/09	RO1	IL 5093
>2/11/09	SL1	IL 5093
>2/12/09	BB1	IL 9093
>2/12/09	BB2	IL 9094
>2/12/09	RO1	IL 9095
>2/12/09	SL1	IL 9096
>2/13/09	BB2	IL 9193
>2/13/09	SL1	IL 9194
>
>
>...to produce this result set?
>
>
>RowDate	CombinedCommentId
>2/11/09	IL 5093
>2/12/09	IL 9093 IL 9094 IL 9095 IL 9096
>2/13/09	IL 9193 IL 9194
>
>
>The obvious attempt is to generate a concatenated field out of the individual CommentId fields for rows with common RowDate. The catch is to not repeat a CommentId that might exist on multiple rows with the same RowDate. My attempts so far have resulted with repeated values for 2/11/09 in the CombinedCommentId field, that is, IL 5093 repeats three (3) times while I only desire it to appear once as in the sample result set.
>
>Thanks in advance.
>Vince
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform