# Thread: Calculating a Local Currency Value

1. Registered User
Join Date
Nov 2003
Posts
9

## Unanswered: Calculating a Local Currency Value

I've written an Sql statement to extract the Currency Amount and the currency rate and I want to calculate the Amount in Local Currency.

If the currency amount is in the local currency the Currency rate value returned is 0. I have used a case statement to convert the 0 to 1. (is there
easier way)

But I now can't calculate my Local amount value because of the way I have converted the currency rate.

Select IH.Amount, 'Currency Factor' = CASE
when
IH.[Currency Factor] = 0 then 1
else IH.[Currency Factor]
end,

what way should I have written this?

2. Window Washer
Join Date
Nov 2002
Location
Jersey
Posts
10,322
Ya lost me....

How about some sample data and what the expected results should be...DDL would be useful as well....

3. Registered User
Join Date
Nov 2003
Posts
9
Geraldine Solved it ..........

CASE
WHEN CurFctr = 0 THEN Amount
ELSE CurFctr * Amount
END AS Amount

Thanks Geraldine ... again

4. Window Washer
Join Date
Nov 2002
Location
Jersey
Posts
10,322
Well...congrats....

Who's Geraldine?

5. World Class Flame Warrior
Join Date
Jun 2003
Location
Ohio
Posts
12,595
Wasn't Geraldine Sanford's wife?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•