Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference DBLOOKUP
Functions and Expressions Reference Guide
86
DBLOOKUP
The DBLOOKUP function executes an SQL statement against a database. The SQL
statement can be any permitted by your database management system or ODBC
driver.
Syntax
DBLOOKUP ( single-text-expression , single-text-expression ,
[ single-text-literal ] )
Note There are two different ways to specify the arguments for DBLOOKUP.
Meaning 1
DBLOOKUP ( SQL_statement , mdq_filename , database_name )
The arguments for
DBLOOKUP are:
! The first argument is an SQL statement as a text string. This can be any
valid SQL statement 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.
Meaning 2
DBLOOKUP ( SQL_statement , parameters )
The arguments for
DBLOOKUP are: