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 |
|
yaman
Posting Yak Master
213 Posts |
Posted - 2008-07-05 : 09:04:47
|
| SIRI want a Distinct List of Particular column using COALESCE function SET distinct @SubDeptList =(SELECT @SubDeptList = COALESCE(@SubDeptList + ',', '') + CAST(tbl_application.Level12id AS varchar(50)) from tbl_application This query giving me a error Pls help me out Yaman |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-07-05 : 23:33:46
|
| What was the error? Did you set value for @SubDeptList anywhere else? |
 |
|
|
yaman
Posting Yak Master
213 Posts |
Posted - 2008-07-06 : 03:44:24
|
quote: Originally posted by rmiao What was the error? Did you set value for @SubDeptList anywhere else?
I want the List Of Distinct Subdepartment and my above query giving only First record not all record like (1,2,3,4,5) thisYaman |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-07-09 : 09:49:25
|
| SELECT COALESCE(@SubDeptList + ',', '') + CAST(tbl_application.Level12id AS varchar(50)) as SubDeptList from tbl_applicationMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|