Viewing 15 posts - 1 through 15 (of 18 total)
I was able to fix that scenario by changing the over order by line to amount not ID. That fixes one record but still leaves another record broken.
declare @Pledge...
March 5, 2010 at 9:25 am
Here is a good example of where this syntax is overpaying. I think it has something to do with the over (row number) line but I'm not 100% sure....
March 5, 2010 at 8:54 am
I have been looking at this and looking at it and it works great for my test data that I provided here but in some client data I have it's...
March 4, 2010 at 1:14 pm
WayneS (2/25/2010)
ray-SQL (2/25/2010)
Try this, not sure it handles all of your scenarios, so more sample data would be good. But it is working for what you given us.
I've modified what...
March 3, 2010 at 11:19 am
ray-SQL (2/25/2010)
Please try my modified code above, now with your data and added a fix for updating the received amount on Pledge table.
Thank you
I'll give it a try. I'm...
February 25, 2010 at 2:46 pm
Ok, here is some good sample data. I have some here where an acct made more than 1 pledge on the same day with the same fund. There...
February 25, 2010 at 12:49 pm
I do database conversions where I take historical client data who purchase our software and make it fit our system. Sometimes the client data isn't very rationalized. This...
February 25, 2010 at 10:51 am
WayneS (2/25/2010)
February 25, 2010 at 10:47 am
The relationship between the tables is acctid and fundid. The payment.date can be >= pledge.date never less than.
February 25, 2010 at 10:38 am
It's unusual to have money left over. It does happen once in awhile. Where someone decides to pay more than they promised. In that scenario we raise...
February 25, 2010 at 10:28 am
In the scenario posted my accountid's match as well as my fundid and dates.
In real life all of the above is true except the payment date may be...
February 25, 2010 at 10:22 am
No insert can occur. The tables already exist with data in them. I have no control over that.
February 25, 2010 at 10:13 am
So let me ask a follow up question. Under what circumstance would a cursor be good? Small data set?
November 29, 2007 at 2:40 pm
Yep I know what a tally table is. I've been reading the forums in my spare time (what there is of that). 🙂
November 29, 2007 at 2:39 pm
I learned cursors stink ... and I learned the hard way what is meant by RBAR. :laugh:
Actually though this is really going to help. In the 2 weeks...
November 28, 2007 at 2:17 pm
Viewing 15 posts - 1 through 15 (of 18 total)