>> DECLARE @EmployeeList varchar(100)
>>
>> SELECT @EmployeeList = COALESCE(@EmployeeList + ',', '') +
>>    CAST(Emp_UniqueID AS varchar(5))
>> FROM SalesCallsEmployees
>> WHERE SalCal_UniqueID = 1
>>
>> SELECT @EmployeeList

> I ran that code snippet through the SQL Query Analyzer after
> customizing it for the pubs database and got this:

And got what?

It produced a comma delimited list for me on MSSQL2K ...
I didn't try it on MSSQL7.

I also used CONVERT(varchar,myid) instead of CAST

Speaking of which -- does anyone here know the difference between convert
and cast? Do they exist to solve different problems? Is one of them SQL92
standard and the other one MS proprietary? Has one of them been deprecated?
Or did someone at MS just figure they'd kill one bird with 2 stones?



S. Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to