5 Replies Latest reply on Jun 23, 2016 6:00 AM by beverly

    How to program a query with ExectureSQL like ?

    CrimesTechno

      I am working on a search query with "Like ?"  The query give me no result  when I put the search string in a field but If I try with the same value in a constant I have my result. 

      Here are the two query:

       

      ExecuterSQL ( "SELECT \"idDossier\"

      , \"Demandeur\"

      , \"Historique\"

      , \"TravailDemandé\"

      FROM DemandeAssistance

      WHERE

        \"Historique\" LIKE ?

      OR \"TravailDemandé\" LIKE ?" ; $$separateurChamp ; $$separateurLigne ; RechercheGlobale::chaineComposée ; RechercheGlobale::chaineComposée )

       

      ExecuterSQL ( "SELECT \"idDossier\"

      , \"Demandeur\"

      , \"Historique\"

      , \"TravailDemandé\"

      FROM DemandeAssistance

      WHERE

        \"Historique\" LIKE ?

      OR \"TravailDemandé\" LIKE ?" ; $$separateurChamp ; $$separateurLigne ; "%Roxanne%" ; "%Roxanne%"

      )

      Thanks for your help

       

      Jo