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 |
|
pnpsql
Posting Yak Master
246 Posts |
Posted - 2011-08-31 : 01:41:31
|
| dear all, i need to assign some values to cursor i have declared but there is no table from where i select the values, how can i do this .pls suggest..challenge everything |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-31 : 01:50:55
|
| so you're values are static constant values? then whats the point of cusror?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
pnpsql
Posting Yak Master
246 Posts |
Posted - 2011-08-31 : 01:54:52
|
| i need looping one by one , is thre another way.challenge everything |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-31 : 02:01:01
|
| yep. put themin a temporary table then apply a cursor on itIf you can explain what you're trying to do we might be able to suggest a best way. Who knows, we can even avoid cursors if it doesnt necessarily require implementing------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
pnpsql
Posting Yak Master
246 Posts |
Posted - 2011-09-02 : 01:18:38
|
| can it be done using select 1 union allselect 2union allselect 3challenge everything |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-02 : 02:00:48
|
| you can do this way also but you have not yet given us any details on what exactly is your scenario------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-09-05 : 05:42:42
|
quote: Originally posted by pnpsql i need looping one by one , is thre another way.challenge everything
Give us full details of what you are trying to do. There may better way of what you are thinkingMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|