Blog Home  Home Feed your aggregator (RSS 2.0)  
Software Code Help blogs - How to concatenate the field value of table in SQL Server 2000 or 2005?
newtelligence powered
 
 Thursday, November 06, 2008

Declare @Var1 nvarchar(800)

 

Set @Var1=’’

 

Select @Var1 = @Var1 + ‘,’ + Field1 from Table1

 

Select @Var1

Thursday, November 06, 2008 4:56:38 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   SQL  | 
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2009 Software Code Help. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: