Using DBLOOKUP and DBQUERY
A single-text-item is returned by either the DBLOOKUP and DBQUERY function. If your SQL statement is a SELECT statement, the DBLOOKUP or DBQUERY function returns the results of the query in the same format as a query specified in a map input card. If your SQL statement is anything other than a SELECT statement, these functions return NONE.
Both functions return the results of a query (SQL SELECT statement) in the same format as a query specified for a map input card, using the delimited row format. However, the DBLOOKUP function strips off the last carriage return/line feed. Because this information is stripped, it is easier to make use of a single value extracted from a database.
DBLOOKUP and DBQUERY execute an SQL statement within a rule against the database. The SQL statement can be any statement permitted by your database management system or database-specific driver.
There are two syntax methods that can be used to specify the arguments for these two functions: Syntax1 and Syntax2.