|
-
August 30th, 2004, 05:14 AM
#1
Formula for Record Calculation
I have created two commands in the database expert. And I want to do the calulation of these records.
My situation is:
In table A, I have fields "Country","Amount" and "Currency".
In table B, I have fields "Currency" and "Exchange".
I want get the sum of "Amount"*"Exchange" if table A "Currency" = table B "Currency" that group by "Country"
How to write this formula?
Thank you fro helping me.
-
August 30th, 2004, 05:29 PM
#2
Re: Formula for Record Calculation
Have u linked these commands by currency?
-
August 30th, 2004, 08:38 PM
#3
Re: Formula for Record Calculation
Please tell me how to linkand what I should do after linking?
Thanks very much
-
August 31st, 2004, 05:06 AM
#4
Re: Formula for Record Calculation
I have linked the currency field of two commands.
My situation is tableB store the currency of all countries in the world. And some of the countries using same currency. If I use a sql statement to join two table, then the records will be duplicated and cannot get the correct exchange rate of each currency.
So that I want to write a formula that caluclate the tableA amount with correct currency. But I don't know how to get the exchange rate of tableB if tableA.currency=tableB.currency.
Do you have any idea to do that?
thanks alot~~~
-
August 31st, 2004, 05:10 AM
#5
Re: Formula for Record Calculation
I am using mysql 4.0 which is not supported subquery.
If you have any idea other than my method. Please tell me. This problem spent me a week ago~
Really thanks alot~
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|