2 Replies Latest reply on Mar 4, 2015 8:04 AM by Joshua_1

    ExecuteSQL WHERE help

    Joshua_1

      Title

      ExecuteSQL WHERE help

      Post

      I'm trying to use ExecuteSQL to bring in a list of values from several records in a table called "Measurements". It works if I write the following:

      ExecuteSQL ( 
      "SELECT Voltage 
      FROM Measurements
      WHERE testid = '123-456'
      ORDER BY Voltage ASC
      "
      ; "" ; "" )

      However I need "testid" to equal what ever value the user enters in a field belonging to a table called "Analysis" so I wrote:

      ExecuteSQL ( 
      "SELECT Voltage 
      FROM Measurements
      WHERE measurements.testid = analysis.testid
      ORDER BY Voltage ASC
      "
      ; "" ; "" )

      It does not work... What am I doing wrong?