Returning different fields based on criteria

G

Guest

I'm looking to right a query to return the amount we should be billing our
customers for freight.

I have a table in which each record is a package. Each record contains our
job number, a normal freight amount, a discounted freight amount and a
package weight, along with other stuff. Customers qualify for the discounted
rate if the entire shipment is >= 150 pounds.

I need to come up with a query that returns the sum of the normal freight
amounts if the sum of weights is less than 150 pounds, or it returns the sum
of the discounted rates if the sum of weights is >= 150 pounds. I've got the
grouping and summing working OK, but I'm pretty clueless on how to set up
that condition.

Thanks in advance,
Steve
 
G

Guest

Freight: IIF([package weight] >= 150, [discounted freight amount], [normal
freight amount])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top