5 Replies Latest reply: Aug 17, 2016 1:24 AM by Gysbert Wassenaar RSS

    sql select

    ferhat oumohand

      hello all,

       

      can you tell if the syntax of the function below is correct ?

      Normally i must have in the variable (gvNoOfRowsLastLoad ) at least 1 line  but apparently i retrieve nothing in the database.

      when i execute the request in the database i have a data.



      LET pSQLWhereClause = 'WHERE DATE_APPLI = To_Date(' & CHR(39) & Date(Date#($(LVDateModif),'YYYYMMDD'),'MM/DD/YYYY') & CHR(39) & ',' & CHR(39) & 'MM/DD/YYYY' & CHR(39) & ') ';

       

      sub SrcLoad_LISTE_DATE_APPLI (pSQLTableName,pSQLWhereClause )

        LET gvNoOfRowsLastLoad = 0 ;

       

        // Load the QVD Table from the SQL table

       

        LISTE_DATE_APPLI_MODIFIED:

        LOAD DATE_APPLI; SQL SELECT  DATE_APPLI FROM $(gvDBOwner).$(pSQLTableName) $(pSQLWhereClause);

       

        LET gvNoOfRowsLastLoad = NoOfRows('LISTE_DATE_APPLI_MODIFIED')  ;

        Trace gvNoOfRowsLastLoad : $(gvNoOfRowsLastLoad) ;

       

        for vRow = 0 to NoOfRows('LISTE_DATE_APPLI_MODIFIED')

        Let MyVar = Peek('DATE_APPLI',vRow-1,'LISTE_DATE_APPLI_MODIFIED');

        CALL srLoad_M2R_DTM_ACKTRANSACTION_INCR( pSQLTableName, MyVar) ;

       

        next

      end sub

       

       

      Can you help please ?

       

      Regards