Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Issues

Status
Not open for further replies.

Seanm76

Technical User
Dec 4, 2007
1
US
I have a select query that is pulling from two tables. What I want to do is take my Charges field, Payments Field, and Credits Field.

Charges-Payments-Credits=0

Subtracting the Payments and the Credits from the Charges and pulling all the records that equal zero and Summing them up in the output by name is what I am trying to do. For some reason my output is only summing up all lines and placing them in the output by name. I am getting a sum of Charges, Payments, and Credits in the Output.

Can someone help me with my query?

Here are the field names:
Pri Code
Pri name
Procedures
Charges
Payments
Credits

I thought my criteria should have been something like:
"Balance"=0 where [Charges]-[Payments]-[Credits]

But this is not working...

Sean
 
Please post the SQL.

Sure, the early bird gets the worm, but the second mouse gets the cheese in the trap.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top