Description
Similar to the SQLQUERYDEFAULT function, except that two values may be passed in. The first value replaces any %1, and the second value replaces any %2.
Syntax
SQLQUERYDEFAULT ( SourceValue1, SourceValue2, "connection", "sqlStatement", "default_value" )
Parameter | Description |
---|---|
TextSourceField1 | The first source value used in the SQL statement. |
TextSourceField2 | The seconf source value used in the SQL statement. |
connection | The connection for the database to run the query against. If the connection is Scribe Internal Database, the SCRIBE user must have at least SELECT privileges on any table referenced in the SQL statement. |
sqlStatement | The SQL statement to execute. |
default_value | Default value to return if the query does not return a value. |
Remarks
Use this function to avoid wrapping the SQLQUERY2 function in ISERROR when a default value is needed.
If the database was configured as <table>.dbo.<fieldname> then you must include dbo. in the query. See SQLQUERY for more information.
See also