July 20, 2008 at 1:15 am
I have the following query that works just fine:
SELECT [fielda]
FROM TableName
I want to be able to pass the value that's output into a variable. Can this
be done an if so then how? I have looked at the online books and they
weren't much help to me
Note:- Its not a single value returned by select statement..( multiple rowset ) so we cannot use SET or assignment;)
July 20, 2008 at 11:31 am
Well if your title is really correct, then you want something like this"
Declare @STR NVarchar(MAX)
Set @STR = ''
From TableName
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
July 20, 2008 at 1:12 pm
Thanks Barry...::)
July 20, 2008 at 6:33 pm
Glad I could help.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply