1 Reply Latest reply: Dec 7, 2012 8:59 AM by Andreas Lindholm RSS

    Excel value in Sql query

      Hi!

       

      I import a excel like this:

       

      Articles:

      LOAD

           Article,

           MinAnt,

           MaxAnt

      FROM

      [C:\test.xls];

       

       

      Then I want to use theese values in my sql query like this:

       

      Select Article, Maxant - CurAnt FROM values

      WHERE CurAnt > MinAnt

       

       

      How can I use the values from Excel in my sql query? 

       

      Thanks in advance!

        • Re: Excel value in Sql query

          I tried this:

           

          Articles:

          LOAD

               Article,

               MinAnt,

               MaxAnt

          FROM

          [C:\test.xls];

           

           

          Temp:

          Select Article, CurAnt FROM values;

           

          left join(Articles)

          Load *

          RESIDENT Temp;

           

           

          Can you please tell me how to write a SQL query that uses MinAnt and MaxAnt...

           

          Any help is appreciated.

           

          Thanks.