3 Replies Latest reply: Sep 28, 2011 9:28 AM by Michiel van de Goor RSS

    Limit script loading using variables or other solution ??

    Michiel van de Goor

      I need to limit the data loaded. It has to be limited by year.

      I created this:

      let $YearFrom = input('Year from', 'Specify the first reporting year required');
      if (isnull($YearFrom)) then
      let $YearFrom = 1999;
      end if ;

      which nicely creates the variable $YearFrom.

      I want to use the result of this input box to limit the load

      This does not work:


      LOAD
      applymap('Date_map_Billing', DATE) as Billing_Date,
      Month(applymap('Date_map_Billing', DATE)) as Billing_Month,
      Year(applymap('Date_map_Billing', DATE)) as Billing_Year;
      SQL SELECT * FROM Billing where Billing_Year > $YearFrom;

       

      I'm lost in the world of sql.

      How can I correctly use the value from the variable in limiting the load?

      Your help is much appreciated!!