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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expression build in Access

Status
Not open for further replies.

jayc28

IS-IT--Management
Jan 30, 2001
6
0
0
US
I have a table that has shipper zips(from) and consignee zips (to) plus dollar amounts for each of those shipments. Building a simple dupe query I see that the lane 30833 to 31401 has 3125 instances. I want to be able to display the total dollar amount from each of those instances. Does anybody have any idea of what expression or SQL statment I could use in order to do this?

Part of it I am sure is "If Shipper Zip = 30833 and Consignee Zip = 31401 _____ it is at this point that I get stuck.

Any help would be greatly appreciated.
 
You might try a variation of this, substituting your own table and field names:

SELECT zipfrom, zipto, Sum(amt) AS SumOfamt
FROM tblZipInstance
GROUP BY zipfrom, zipto
HAVING (((zipfrom)="30833") AND ((zipto)="31401"))
ORDER BY zipfrom;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top