Help With Statement in Query

shevada123

New member
Local time
Yesterday, 23:32
Joined
Apr 24, 2007
Messages
9
This is my first post and would like help with the following:


I have a warranty database that I have to create adjustment claims. There a re two pricing structures depending on the customer type. One customer type is SH and the other is DD.

I need to create an expression within the query that will allow me to add 1.0639 to the SH pricing (SH*1.0639) for all customers = DD.

So, when I pull a DD customer 1.0639 (6%) will be automatically be added to the List Price.

When I pull a SH customer the price will be the regular list price already housed in the database.

What type of statement will I use here. IF, SELECT or what? and if so, what would it be?


I hope this is clear and appreciate any help or feedback that I can get on this.

Thanks
 
Didn't know what your table and field names were, but something like the following should do it.

SELECT IIF(CustomerType = "DD",ListPrice * 1.0639, ListPrice) AS OverallPrice
FROM tablename;

Alternatively, if you want the result to be displayed in a field on a form or report, then make the source for the field

=IIF(CustomerType = "DD",ListPrice * 1.0639, ListPrice)
 

Users who are viewing this thread

Back
Top Bottom