Accessing database information in a map rule
In many cases, database information for a map will be one of the following:
- the results of a database query or a stored procedure defined as the data source for an input card
- the rows to update or insert into a table defined as the target for an output card.
However, there are certain situations in which you might not want to define the entire query as a data source or the table as a target. For example, you may have a very large table that is used as a source for cross-reference in your map. However, because of its size, reading in and validating all of the information as an input card is impractical. In other situations, you may want to call one map from another using the RUN function when one of the data sources is a dynamically built query.
Two functions provide the ability to access database information from within a rule:DBLOOKUP and DBQUERY. The difference between the two functions is subtle and is based upon how the data resulting from either function is returned.