2 Replies Latest reply: Nov 17, 2014 12:35 PM by Alexander Jarl RSS

    Use reference in a different table in a load statement

      Hi,

       

      I have not used QV for a while and need some help. Do not know if it's even possible to solve my problem.

       

      I'm trying to build my own portfolio application and would like to load historical data from a website in .csv-format. I have all the Tickernames(stock's short names) in one separate table and would like to use this one to load the historical data from the website instead of writing the LOAD-statement multiple times. Where I have "TickerName" I would like to loop the LOAD with TickerNames in a separate table. For exmaple, the load works if I change "TickerName" to "HM-B" which is the ticker name for H&M.

      Will it be possible?

       

      See below:

       

      LOAD

           Date#(quote_date,'YYYYMMDD') AS QuoteDate,

           paper AS StockName,

           exch,

           open,

           high,

           low,

           close,

           volume,

           value

      FROM

      [http://www.netfonds.se/quotes/paperhistory.php?paper=TickerName.ST&csv_format=csv]

      (txt, codepage is 1252, embedded labels, delimiter is ',', msq);

       

      Thanks,

      Alexander