Help with selecting a tier

ejstefl

Registered User.
Local time
Today, 08:42
Joined
Jan 28, 2002
Messages
378
Hello,

I'm hoping y'all can help. I have two tables. The first table, lets call it tblData, contains a certain price of an item. The second table, tblRanges, contains ranges of an item to be used based on the price.

For example, take Item A. If the price is between 0 and 5.99, apply a percentage of 10%. If between price 6 and 9.99, apply a percentage of 15%. If price greater than 10, apply 20%.

How do I choose the proper percentage based on the price? I can supply more data if necessary.

Thanks,
Eric
 
Hello,

Thanks for the reply. I understand the IIF function, but don't understand how to use it in this context. I need to select the correct tier group based on the Price. For example, I have item A with a price of $11.

Now I need to look at my tier table, tblRanges. I need to look at the tiers for item A. Lets says say there are 3. I would have 3 records - 1 for each tier. How do I select the correct tier to display?
 

Users who are viewing this thread

Back
Top Bottom