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.
| Author |
Topic |
|
arsheena.alam
Starting Member
1 Post |
Posted - 2011-03-26 : 08:10:54
|
| hi,I have declared a variable @franchiseId.Now i want To get the value of [franchisename]column into this variable from a table i.e the variable @franchiseId should contain the value of [franchisename] which is in franchise tableI want to know the command to execute the above scenerio!! |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-03-26 : 08:21:06
|
[code]select @franchiseId = [franchisename]from franchisewhere < some condition here >[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-03-27 : 01:27:28
|
| make sure you needs a single value satisfying the condition or else you might have to use table variable instead.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|