Hello,
I have inherited an Access 97 database that needs updating and I'm trying to
understand what my predecessor has put into place. Basically it accepts
criteria on a form to import data into a SQL (2000) table from our Oracle
back end. The code builds a SQL statement from the user's criteria and it is
put in a text file that a DTS job picks up for the import. Part of the
statement up through the (+) is static. My question is why is there a (+) in
the SQL? Here is the statement that was written into the text file:
SELECT UNITS.UNIT_ID, UNITS.CONTRACT_ID, UNITS.COLL_DATE,
UNITS.RECEIVED_DATE, UNIT_INTERDICTIONS.INTER_CODE FROM UNITS,
UNIT_INTERDICTIONS WHERE UNITS.UNIT_ID = UNIT_INTERDICTIONS.UNIT_ID(+) AND
CONTRACT_ID = 'BSTRG0012'
I believe the "WHERE UNITS.UNIT_ID = UNIT_INTERDICTIONS.UNIT_ID(+) " is the
old way to join tables in SQL statements. Is the (+) a kind of outer join?
Seems that the (+) would not be desirable. Not sure I'm getting this right.
Thanks for any help
John Vinson - 26 Feb 2005 01:18 GMT
>I believe the "WHERE UNITS.UNIT_ID = UNIT_INTERDICTIONS.UNIT_ID(+) " is the
>old way to join tables in SQL statements. Is the (+) a kind of outer join?
Yes; it's how Oracle specifies an outer join. This will work only as a
pass-through query, since it's not valid Access SQL syntax; it will
return all UNITS records whether or not there are matching
UNIT_INTERDICTIONS records.
John W. Vinson[MVP]