C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Getiing Query Result as Comma Separated Value


Posted Date: 23 Apr 2007    Resource Type: Code Snippets    Category: ADO.NET

Posted By: Dotnet Galaxy       Member Level: Gold
Rating:     Points: 10



Getting the sql query output to comma separated value. For example, In the below query instaed of getting values into row by row, the below query will give the result in 1 row as a comma separated.



declare @name varchar(500)
set @name=''
select @name = coalesce(@name+lastname +',','') from employees where employeeid in (1,2,3,4,5);
select substring(@name,1,len(@name)-1)






Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Execute multiple Select statements using SqlCommand object
Previous Resource: Allow only one row to get updated in disconnected data access
Return to Discussion Resource Index
Post New Resource
Category: ADO.NET


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

web conferencing services

Contact Us    Privacy Policy    Terms Of Use