|
Billy Rowe wrote: > Does SQL and/or OpnQryF filter records before the joining of 2 files? > > For example, If I wanted to join a Customer table to the Transaction table > only for let's say customer number 222. > > Would the system join the file first and then filter the records OR > would the system filter the records first and then join only the > corresponding > customer(222) to it's transactions for presentation to the screen or a > Program? > > TIA, > Billy Billy, To my knowledge, any query using the query engine will first join the file, then check the selection criteria and lastly, return the selected fields. So, if your query looks like this: SELECT fielda, fieldb FROM file WHERE fielda = 222 then the query engine will 1) do the FROM 2) do the WHERE 3) do the SELECT This is my understanding of SQL (query) of 6 years ago. I do not think it has changed since. Regards, Carel Teijgeler +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.