AnsweredAssumed Answered

Execute SQL - Using variable with WHERE

Question asked by laguna92651 on Jun 19, 2017
Latest reply on Jun 19, 2017 by bigtom

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 ";"";"" )]