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 2008 Forums
 Transact-SQL (2008)
 Storing the value from a select statement in a var

Author  Topic 

Shadab Shah
Starting Member

23 Posts

Posted - 2012-07-19 : 05:50:55
Hi all,

I have being trying to stored a value from a select statement in a variable . Since i know that arrays cannot be used in SQL Server, so what are the alternatives i can used to store the values. To Give a clear picture of what i am trying to do is,

col1
100
150
200
250

so i want variable which should be having each individual value. for example like @a=100, @b=150, @c=200, @d=250.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-07-19 : 06:06:49
please do not cross post and continue over http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=176927


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Shadab Shah
Starting Member

23 Posts

Posted - 2012-07-19 : 06:09:16
I was not getting appropiate answer over there so thought of posting it here :-)
Go to Top of Page
   

- Advertisement -