3 Replies Latest reply: Sep 27, 2010 1:02 PM by Shubhasheesh Chakraverty RSS

    Varaiable in SQL WHERE instruction

      Hello Everybody,

      i'd like to know if it's possible to pass a variable from an inputbox in a WHERE from SQL connection.

      Ex:

       

       

       



       

      Load

      Input('Valeur dentrée', 'Zone de saisie') as v,

      Recno() as r

       

       



      autogenerate 1;

      ODBC CONNECT TO ADX_ADXV140 (XUserI ........................);

      LOAD

       

       

      "XYEAR_0" as "ANNEE",

       

       

       

       

      "XMONTH_0"

       



      as "MOIS",

      "BPCINV_0"as "CLIENT",

       

      ........

       

       

       



       

      SQL SELECT *

       

       

       



       

      FROM

      v140.AUTO.XCUMARTCLI INNER JOIN v140.AUTO.BPCUSTOMER ON v140.AUTO.XCUMARTCLI.BPCINV_0 = v140.AUTO.BPCUSTOMER.BPCNUM_0 WHERE ((v140.AUTO.BPCUSTOMER.REP_0)= ' here the Variable v ' AND XYEAR_0 > 2008)";

      Thanks for your answers.