3 Replies Latest reply on Dec 22, 2014 9:59 AM by FredH

    ExecuteSQL issue

    FredH

      Title

      ExecuteSQL issue

      Post

      Hi Experts,

      I have two linked tables : Project & Exploitation.  For each Project, I have multiple lines in Exploitation (1 line per year -> 20 years per Project).  In Exploitation, I also have a field that contains a description of that year. 

      What I would like to have now, is a field in my Project table that gets the description of the current year.  
      My idea was to do so using ExecuteSQL but I do not manage to get this working as it returns "?" for all my lines in my Project table.

      This is the code I used : 
      ExecuterSQL("SELECT E.Stade d'exploitation par année FROM Exploitation E JOIN Project P ON P.__pkProjectID = E._fkProjectID where E.Année = ?"; "|";" ¶";Year( Get( CurrentDate )))

      After some research, I think that the error comes from my special characters ( _ and blanks in my field names but I do not see how to change this).

      Do you know what I could do to make this work?  
      Thanks in advance for your input!
      Kind regards,

      _Fred_