5 Replies Latest reply: May 3, 2016 7:16 AM by Gabor Tarnoczai RSS

    Currency conversion - Joining tables

    Ludvig Ã…berg

      Hi! I have a table of data of the structure (lets call it Sales):

       

       

      start_date

      company_name

      due_total

      currency_code

      2016-02-01Ovlov54445978
      2016-02-01baas5443144
      2015-03-01Ovlov65543978
      2014-01-01baas6654144

       

       

      Along with a currency conversion table of the structure:

       

      Yearcurrency_codecurrency_value
      20169780.766
      2015978

      0.801

      20161445.767
      20151446.5

       

      What I want to do is to add a field in the Sales (due_total_myCurrency) that takes the due_total and multiplies it with the currency_value of the same currency_code AND year. The currency conversion table is created with the crosstable prefix.

       

      Any Ideas would be greatly appreciated!