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 |
|
WoodHouse
Posting Yak Master
211 Posts |
Posted - 2009-07-30 : 10:37:43
|
Hi GuysAm new to sql server...pls help on this...Create table Test - 100 recordsWhile Loop test Calculations for two rows for 100 rowsEndRemaining 98 records Next time the loop will take 98 While Loop test Calculations for two rows for 98 rowsEnd Next time the loop will take 96While Loop test -- 96 records now.. Calculations for two rows for 94 rowsEndIts upto when the table is empty or when the condition is meeting How to iterate in single loop….Please help out…. |
|
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2009-07-30 : 10:45:33
|
| Not sure on what you're trying to achive here can you explain further |
 |
|
|
WoodHouse
Posting Yak Master
211 Posts |
Posted - 2009-07-30 : 10:52:32
|
| [code]I have table with 100 recordsFirst time I took all 100 records for calculations After applying formula I will get only 98 records as per the formula rule..Again I took remaining 98 records and will apply same formula After I get only 96 recordsAgain I took 96 records will apply same formula After I get only 96 recordsSo this loop will continue upto end of the record How to form the query…..[/code] |
 |
|
|
WoodHouse
Posting Yak Master
211 Posts |
Posted - 2009-07-31 : 01:04:27
|
| HiPls help on this... |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-07-31 : 02:34:46
|
| What is the calculation involved in two rows?MadhivananFailing to plan is Planning to fail |
 |
|
|
WoodHouse
Posting Yak Master
211 Posts |
Posted - 2009-07-31 : 02:38:50
|
| hiThe data are each product sales details for 36 months….Inventory forecasting formulas |
 |
|
|
|
|
|