Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2005

Tip: Looking for answers? Try searching our database.

SQL Statement in VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LeAnn - 26 Feb 2005 01:07 GMT
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]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.