DAM Extract from Remote Database Not Same As Local ExtractID: Q93529
|
When you use the Data Access Macro (DAM) to extract records from a
remote (external) database you may get different results than you
would if you performed the same extract from a database that is
defined in a local Microsoft Excel file.
The reason for the different extract results is that, in most cases,
Microsoft Excel assumes that the extract criteria contain only partial
strings of text while the DAM assumes that the extract criteria
contain complete strings of text. For example, when you extract
records based on criteria where a city field value equals "San", a
local Microsoft Excel database would return any city beginning with
the word "San" such as San Francisco, San Jose, and San Diego.
However, the Data Access Macro will only return the city "San."
When the Data Access Macro extracts information based on defined
criteria and extract ranges it translates the criteria to an SQL query
before it passes the query to the Data Access Language (DAL) software.
The Data Access Macro uses the extract range to determine the SQL
query SELECT clause and the criteria to determine the WHERE clause.
For example, if A1:A2 is defined as the criteria, where
A1="Table1.city" and A2="San", and A4:C4 is defined as the extract
range, where A4="Table1.name", B4="Table1.address", and
C4="Table1.city", the Data Access macro will translate the criteria
into the following SQL query:
SELECT
Table1.name, Table1.address, Table2.phone
FROM Table1
WHERE Table1.city = "San"
FOR EXTRACT;
PRINTALL;
This particular query will return records containing only the text
"San" in their city fields. The same query in Microsoft Excel would
extract all records containing the text "San" as the first three
letters in their city field.
Additional query words: 4.00 novell db2 db/2 rdb oracle ingres dal
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: March 30, 1999