Forum Discussion

Samwise's avatar
Samwise
New Contributor II
15 days ago

How to obtain FxRateId in BR.

I am trying to write a query to the FxRates application table however, I cannot find a function to obtain the FxRateId as seen below. I see that the ID changes based on the year and not just the rate type.

 

1 Reply

  • Russell's avatar
    Russell
    New Contributor III

    Can't you just join the 2 tables? FXRate and FXRateType?

    SELECT 
        rt.UniqueID              AS FXRateID,           -- the GUID for the rate
        rt.Name                 AS RateTypeName,
        rt.Description          AS RateTypeDescription,
        r.TimeID,
        r.SourceCurrencyID,
        r.DestCurrencyID,
        r.Amount
    FROM FXRate r
    INNER JOIN FXRateType rt
        ON r.FXRateTypeID = rt.UniqueID