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 |
|
tariq2
Posting Yak Master
125 Posts |
Posted - 2011-02-14 : 06:40:07
|
| I want to run a query using a stored variable.So instead of:select * from d_jobattributes where jobid = '0903370501'I want to run the following:declare @job varcharset @job = 0903370501select * from d_jobattributes where jobid = @jobHowever when I process:select @jobI get a * in the results paneThanks in advance |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-02-14 : 06:43:37
|
declare @job varchar(30)set @job = '0903370501' N 56°04'39.26"E 12°55'05.63" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|