3 Replies Latest reply: Feb 3, 2014 1:23 PM by Ralf Becher RSS

    URL load - text vs numeric

    Evelien Morel

      Hi,

       

      I'm loading data from a currency website.

      Some of the retrieved data is numeric, other is text. I have no idea why this happens.

      Specificly, it occurs in the fields ToEUR & FromEUR

       

      Does anyone have an idea how to fix this?

       

      Thanks

       

      Here is the code i'm using:

      For i = 0 to 16
      
          Let dd = Date(Today()-$(i), 'MM/DD/YY');
           
          EuroRates:
          LOAD
           Date(Today()-$(i))                                                                           As ExchangeDate,
           Currency, 
           Code, 
           [EUR/1 Unit]                                                                                  as ToEUR, 
           [Units/1 EUR]                                                                                 as FromEUR,
            Year(Today()-$(i))                                                                           As Year,
           Month(Today()-$(i))                                                                          As Month,
           Day(Today()-$(i))                                                                             As Day,
           Week(Today()-$(i))                                                                           As Week,
           WeekYear(Today()-$(i)) & '-' & Num(Week(Today()-$(i)),'00')                 As RollingWeek,
           Weekday(Today()-$(i))                                                                       As WeekDay,
           Date(MonthStart(Today()-$(i)),'YYYY-MM')                                         As RollingMonth,
              Right(year(Today()),2) & '-Q' & ceil(Month(Today())/3)                      as [YearQtr],
           'Q' & Ceil(Month(Today()-$(i))/3)                                                        As Quarter
         
          
          FROM
          [http://www.oanda.com/convert/fxdaily?date=$(dd)&date_fmt=us&exch=EUR&lang=en&sel_list=USD_HUF_UAH_RUB_PLN_CNY&value=1&format=HTML&redirected=1]
          (html, codepage is 1252, embedded labels, table is @1);
      Next
      
      Store EuroRates into EuroRates.QVD;
      
      

       

      Here you see a picture of the result:

      QV numeric vs text.png