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.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 want the values of alrecords in a string variable.

Author  Topic 

misterraj
Yak Posting Veteran

94 Posts

Posted - 2014-12-15 : 09:52:17
declare @abc nvarchar(max)

select @abc = ProductName ,convert(varchar(max),ProductPrice )
from Product

print @abc

but @abc has only the value of the last record. not everything.
can any one please help!

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-12-15 : 17:14:45
please post some sample input and desired output
Go to Top of Page
   

- Advertisement -