7 Replies Latest reply on Jun 19, 2017 5:21 PM by bigtom

    Execute SQL - Using variable with WHERE


      I am trying to get the count of records based on the company name. If I use WHERE Type = 'HP' I get the correct count but when the company name is stored in a variable, $company, I get a ?. Can a variable be used to do this or do I have the syntax wrong.


      Set Variable[$Count; Value:ExecuteSQL ( "SELECT COUNT( id ) FROM SummaryData WHERE Type = $company ";"";"" )]