Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kamii47
Constraint Violating Yak Guru
353 Posts |
Posted - 2011-12-02 : 08:45:51
|
| Please let me know how can i enable distinct in following CSV generation scriptdeclare @SomeColumnList as varchar(max)SELECT @SomeColumnList = COALESCE(@SomeColumnList + ', ', '') + CAST(segClassDefiningPreparation AS varchar(20)) FROM SegmentRecordorder by segClassDefiningPreparationKamran ShahidSr. Software Engineer(MCSD.Net,MCPD.net) |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-12-02 : 08:49:34
|
[code]SELECT @SomeColumnList = COALESCE(@SomeColumnList + ', ', '') + CAST(segClassDefiningPreparation AS varchar(20))FROM ( SELECT DISTINCT segClassDefiningPreparation FROM SegmentRecord ) SegmentRecordorder by segClassDefiningPreparation[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
kamii47
Constraint Violating Yak Guru
353 Posts |
Posted - 2011-12-02 : 09:03:16
|
| Thanks khtanKamran ShahidPrinciple Engineer Development(MCSD.Net,MCPD.net) |
 |
|
|
|
|
|