May 1, 2008 at 1:38 pm
May I ask what this is intended to do and why it's a cursor instead of just using Insert ... Select ...?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 1, 2008 at 2:24 pm
I am looking access data from a view and based on row date pull last 6 full weeks of data and populate a table with that data broken out by week.
May 1, 2008 at 2:38 pm
You should be able to do that with a single insert statement, without using a cursor. I'd have to see the table definitions, some sample data (a few rows), and the expected output, to be able to help out on that much. But it should be possible.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 8, 2008 at 12:22 pm
Sorry for nor replying sooner I have been out past few days. Anyway I have attached requested information. A couple notes:
-Table A and B need to be joined by Row_date Login_ID. I realize it would help if Row_date was a datetime field, but it is imported form a text file.
-Percentages in Expected Output tab are created by converting dividing champ_production_time/Staffed_Time where Staffed_Time has been converted to minutes.
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply