Nathan Riley
asked on
Syntax for Setting a Variable to Sum of Column
Ok, so I have a table named Customer_Juros has a column named Doctype, InvoiceNo and a column Amount that I want information out of. How it works is there are 8 Doctype's:
1=invoice
2=cashpayment
3=insurance
ect...
In the Amount column are the corresponding amounts.
I want to set a variable:
set @DetailBalance = sum of the Amounts where the doctypes are 1's for Invoice #20545
is that possible or another way to do this?
1=invoice
2=cashpayment
3=insurance
ect...
In the Amount column are the corresponding amounts.
I want to set a variable:
set @DetailBalance = sum of the Amounts where the doctypes are 1's for Invoice #20545
is that possible or another way to do this?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window