Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Be courteous. Everyone here helps because they enjoy helping, not because it's their job.
Have you searched or Googled for a solution?
Be specific! eg "How do I change the dialog colour?" instead of "My code doesn't work. Help?"
Tag your question appropriately.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.

What I have tried:

Resolved
Posted
Updated 2-Mar-18 9:22am
v5

1 solution

Seems you don't understand your teacher. You have to create two User Defined Functions (UDF)[^].

Quote:

1. The TaxRate UDF provides the tax rate based on a ShipCountry and returns a FLOAT value.
If the ShipCountry starts with a letter in the range
A-J the tax rate is .04
K-P the tax rate is .03
Q-Z the tax rate is .025

2. The TaxAmount UDF provides the tax due. It takes two values, a SalesAmount and a TaxRate. The SalesAmount is of the MONEY data type and the TaxRate is of the FLOAT data type. The UDF returns a MONEY value.


Finally, you have to provide a query which uses that 2 UDF's.

Follow the link i provided to find out how to create UDF.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900