Complex Query
-
Hi All, I have to write a query in SQL Server 2000/2005/2008 in such a way that, "the sum of 1st Column 2nd row and 2nd Column 1st row is placed in 2nd column 2nd row". Any kind of link or any suggestion will be very very helpfull.
Thanks & Regards, Md. Abdul Aleem NIIT technologies
-
Hi All, I have to write a query in SQL Server 2000/2005/2008 in such a way that, "the sum of 1st Column 2nd row and 2nd Column 1st row is placed in 2nd column 2nd row". Any kind of link or any suggestion will be very very helpfull.
Thanks & Regards, Md. Abdul Aleem NIIT technologies
In other words, it sounds like column 2 is a running total of column 1. There's not a real elegant way that I know of, but it is a common problem. Did you try a search for SQL running totals[^]?
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
-
In other words, it sounds like column 2 is a running total of column 1. There's not a real elegant way that I know of, but it is a common problem. Did you try a search for SQL running totals[^]?
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software