Setting Criteria in a Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to setup a criteria in a query with the following concept:

TABLES
- Merchant Table (Merchant_ID, Merchant_Name, INT_Rate, LOC_Rate)
- Transaction Table (Merchant_ID, Date, Card_No, Amount)

QUERY
Display Merchant_ID, Merchant_Name, Date, Card_No, Amount, Applicable_Rate,
Rate_Amount, Net_Amount

Note: The [Applicable_Rate] is different for different [Card_No].
[Applicable_Rate] for [Card_No] starting with "4025" will be [LOC_Rate] and
[Applicable_Rate] for [Card_No] other than "4025" will be [INT_Rate].

How can I formulate the query in Query Design View in MS Access. Appreciate
any support on this.
 
Hi,

In your query, create a new column:

Applicable_Rate: iif([Card_No] = "4025",[LOC_Rate] , [INT_Rate].)
 
Hey,

THANKS A LOT. Take care
--
Nabeel


Chris said:
Hi,

In your query, create a new column:

Applicable_Rate: iif([Card_No] = "4025",[LOC_Rate] , [INT_Rate].)

Nabeel said:
Hi,

I am trying to setup a criteria in a query with the following concept:

TABLES
- Merchant Table (Merchant_ID, Merchant_Name, INT_Rate, LOC_Rate)
- Transaction Table (Merchant_ID, Date, Card_No, Amount)

QUERY
Display Merchant_ID, Merchant_Name, Date, Card_No, Amount, Applicable_Rate,
Rate_Amount, Net_Amount

Note: The [Applicable_Rate] is different for different [Card_No].
[Applicable_Rate] for [Card_No] starting with "4025" will be [LOC_Rate] and
[Applicable_Rate] for [Card_No] other than "4025" will be [INT_Rate].

How can I formulate the query in Query Design View in MS Access. Appreciate
any support on this.
 
Back
Top