Can ayone help please.
I need to be able to use 2 Servoy global variables in an SQL statement. The original SQL statment is as:
var queryStatement = "SELECT * FROM companies where (select COUNT(*) FROM contacts WHERE companies.companyID = contacts.company_id) > 5 order by companies.company_name;";
I need to be able to use a global variable in place of the operand (>) and numeric (5) in above SQL statement.
I have sucessfully tested replacing the numeric(5) with a Servoy global, as:
var queryStatement = "SELECT * FROM companies where (select COUNT(*) FROM contacts WHERE companies.companyID = contacts.company_id) > '" + globals.findCompanyContactCount + "' order by companies.company_name;";
But I can’t seem to find the correct syntax to replace the operand (>) as well as the globals.findCompanyContactCount