Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference DBQUERY
Functions and Expressions Reference Guide
90
DBQUERY
The DBQUERY function executes an SQL statement against a database. The SQL
statement can be any permitted by your database management system or ODBC
driver.
Syntax
DBQUERY (single-text-expression , single-text-expression ,
[ single-text-literal ] )
Note There are two different ways to specify the arguments for DBQUERY.
Meaning 1
DBQUERY (SQL_statement , mdq_filename , database_name)
The arguments for
DBQUERY are:
! The first argument is an SQL statement as a text string. This can be any
valid SQL statement that is permitted by your database management
system and supported by your database-specific driver. In addition to a
fixed SQL statement, this argument can be a concatenation of text literals
and data objects, enabling the concatenation of data values into your SQL
statement.
! The second argument is the name of a database query file (.mdq) produced
by the Database Interface Designer. It contains the definition of the
database that the SQL statement is to be executed against. If the .mdq file
is in a directory other than the directory of the map, the path must be
specified.
Note The .mdq file is accessed at map build time and is not needed at
runtime.
! The third argument is the name of a database in the database query file
(.mdq) as defined in the Database Interface Designer.
If used in this way, both the .mdq filename and database name must be
literals.