Description
Execute a SQL query that returns a scalar boolean value. If the query returns a dataset, the value of the first column in the first row is returned.
Syntax
ExecuteSqlBoolean(connection_id, sql_query[, param1] [,…paramN])
Arguments
connection_id (string) - The unique identifier of the connection to use to execute the query. You can find it in the connection's page.
sql_query - String expression that evaluates to a query that returns a scalar value.
param11 ... paramN - optional parameters to pass to the query. Use ? as placeholder in the query.
Examples
ExecuteSqlBoolean('mysql_55','SELECT IsActive FROM users WHERE user_id = ?',user_id)
Notes
This function only executes in job runtime. When validating a package with variables that use the function or in X-console, the function returns null.
Return value datatype
Boolean
Impact of null value
If the connection_id or sql_query are null, null is returned.