January 10, 2006 at 12:03 pm
Hi there,
My boss has asked me to look into how we are going to add up line items horizontally before adding together vertically.
What i have is ServiceLines on a transaction, each ServiceLine may have different amounts of payments applied (this gets carried out a few decimals hence the need to go horizontal before vertical). I need to get the balance of the transaction. How do i go about adding across first then down?
Any examples of this in effect would be greatly appreciated? I can only think of cursors.
Thank you,
Brian
Think great, be great!
January 10, 2006 at 12:10 pm
Hi Brian,
You will get a better answer if you post DDL for the table, as well as some sample data and expected results. Without that, a simple method might be a calculated column.
Assuming you have something like acct#, service1, service2, service3 then you coule create a calculated column as service1 + service2+service3. Your vertical sum is then simply sum(calculatedColumnName).
This may or may not be useful in your specific situation. More details will really help us to help you.
Have a nice day
Wayne
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply