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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-10-23 : 07:40:12
|
Shadow of the Beast writes "I Have Got a table which i need to iterate through "row by row"fetching each row and performing a calculation with the value and valueDates and the inserting this calculation into another table Below is the Quaterly table i want to iterate through without CURSOR or Whil loopValues Values Dates1.10 2006-03-31 00:00:00.0001.20 2006-06-30 00:00:00.0001.30 2006-09-30 00:00:00.0001.40 2006-12-31 00:00:00.000 (effectively each row represents a quaterly Value and ValueDate e.g value = 1.50 valuedate is 31/03/2006 the calculations break this down to the monthly data and dates for that quarter) this expanded data is then fed into another table. Is there a better way to iterate through the records without using cursors?Thanks" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-23 : 07:49:12
|
| What type of calculation?Soemthing likeInsert into TargetTable(column)Select DateAdd(Minute,Values,ValuesDate) from SourceTableMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|