Login
Products
Sales
Support
Downloads
About
Home
»
Technical Support
»
DBISAM Technical Support
»
Support Forums
»
DBISAM SQL
»
View Thread
View Thread
The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Summing columns in a row
Mon, Oct 26 2009 9:03 AM
Permanent Link
Rob
Hello.
I think I know the answer to this, but is it possible using SQL to sum a number of columns in each row to a Totals column?
At present I'm skipping through the resords to do it.
Thanks.
Mon, Oct 26 2009 9:35 AM
Permanent Link
Roy Lambert
NLH Associates
Team Elevate
Rob
Assuming you know which columns you want it should be possible something like
select _Sequence, _Order, (_Sequence +_Order) AS CrossTotal from billing
or to give the totals
select SUM(_Sequence), SUM(_Order), SUM((_Sequence +_Order)) AS CrossTotal from billing
Roy Lambert [Team Elevate]