Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference DBQUERY
Functions and Expressions Reference Guide
91
Meaning 2
DBQUERY ( SQL_statement , parameters )
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 a set of parameters, either:
a)
-MDQ mdqfilename -DBNAME dbname
The keyword
-MDQ is followed by the name of the database query file
(.mdq) produced by the Database Interface Designer. This .mdq file
contains the definition of the database. If the .mdq file is in a directory
other than the directory of the map, the path must be specified. The
.mdq filename is followed by the keyword
-DBNAME and the database
name as specified in the Database Interface Designer.
Note Using this syntax, the .mdq file is accessed at runtime and must be
present.
- or -
b)
-DBTYPE database_type [database specific parameters]
The keyword
-DBTYPE is followed by a keyword specifying the database
type (for example,
ODBC or ORACLE) followed, optionally, by database-
specific parameters.
Note This syntax does not use an .mdq file, because the database-specific
parameters provide the information required to connect to the database.
Refer to the appropriate Database Adapter document for detailed
information on the database-specific parameters that can be specified.
When used with Meaning 2,
DBQUERY must conform to these rules:
! All keywords (e.g.,
-DBTYPE) can be upper or lower case, but not mixed.
! A space is required between the keyword and its value (for example,
-
DBTYPE ODBC
).