|
One easy way is to start eliminating tables from the query until the person reappears, once that happens you know which join is the problem. -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark Allen Sent: Wednesday, November 29, 2006 10:29 AM To: Midrange Systems Technical Discussion Subject: SQL from MS SQL Server I have an SQL statement that runs nightly to pull data from our iSeries (V5R4) for a web based directory that does not "appear" to be pulling all the data correctly (1 specific person right now). This is NOT a pretty statement and would like the lists advice on the best way to see "why" I am missing this person (and probably more) This is a SELECT DISTINCT followed by a series of joins as follows: INNER JOIN then 7 LEFT JOIN's then 6 LEFT OUTER JOIN's Questions: 1. The INNER JOIN means that data must exist in both files? 2. LEFT JOIN and LEFT OUTER JOIN means pull from first/left most file all records and any matching (if any) from the second file 3. Is there a way to run the SELECT so I can see "where" it is dropping the affected person There are just a couple of WHERE statements and they do not appear to be affecting the selection (the person missing would be selected based on the WHERE condition)
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.