Ok, guys, I'm seeing two schools of thought here.  Dave & Gord say to let the 
WHERE do the
"joining", whereas Rick suggests using JOIN and taking care of file placement 
in the join.

Gord also mentions that using WHERE will cause the query optimizer to determine 
the best path.

I spruced up Rick's example and came up with:
 Select  All     T01.JOBNUM, T01.REVNUM, T01.PHSCD,
                   T01.CCPNUM, T01.CCPAMT, T02.CSTTYP 
  From           PCPESTCCP T01           
            join PCPJOBHDR T03 on        
                  T01.JOBNUM = T03.JOBNUM
            join PCPTBLCCP T02 on        
                  T03.CMPNUM = T02.CMPNUM
              and T01.CCPTYP = T02.TBLID 
              and T01.CCPNUM = T02.CCPNUM
  Where         T01.JOBNUM = '3ACM0170'
            and T02.CSTTYP = 'C'

I suppose it gets into personal opinion, but, in this example anyway, I find 
using the JOIN makes
it more apparent that you are joining files and how you are joining them.  (vs. 
using WHERE to do
the join.)

Comments and advice are welcome & appreciated.

- Dan

--- "Smith, Dave" <DSmith@xxxxxxxxx> wrote:
> Dan:
>  
> The join using the WHERE is no different than the join using the JOIN. (A 
> rose by any other
> name....)  Within my embedded SQL, I like to use the JOIN operator because 
> it's consistent with
> the LEFT OUTER JOIN and EXCEPTION JOIN operators.   I must say the more SQL I 
> learn, the more I
> love it!
>  
> David Smith
> dsmith@xxxxxxxxx  

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.