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 |
|
khufiamalik
Posting Yak Master
120 Posts |
Posted - 2008-08-21 : 04:14:09
|
| Hello All,I have a query likeSELECT TOP(1) Basic_Pay*60/100 from Table2 and i have to use it in SP and want to get the resultant value in a variableso I made it likeDeclare @output as varchar(2100)SELECT @output = TOP(1) Basic_Pay*60/100 from Table2 But this query is giving me error.Can any one tell me that how to use the above query??? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-21 : 04:15:08
|
| SELECT TOP(1) @output = Basic_Pay*60/100 from Table2 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-21 : 04:15:34
|
| SELECT TOP(1) @output = Basic_Pay*60/100 from Table2 MadhivananFailing to plan is Planning to fail |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-21 : 04:16:47
|
MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-21 : 04:18:52
|
quote: Originally posted by madhivanan
MadhivananFailing to plan is Planning to fail
26 secs delay |
 |
|
|
|
|
|