2.2 KiB
Util Parts Excluded by AS400
Analysis generated on: 4/2/2025 10:15:13 AM
SQL Statement
SELECT [Util Selection 2].*
FROM [Util Selection 2] LEFT JOIN [Util Selection 3] ON [Util Selection 2].prt = [Util Selection 3].PRDNO
WHERE ((([Util Selection 3].PHANT) Is Null));
Dependencies
- None
Parameters
- Error analyzing parameters: For loop not initialized
What it does
SQL Query Description
Overview
This SQL query retrieves data from two tables, [Util Selection 2]
and [Util Selection 3]
, based on a join condition. The query uses a LEFT JOIN
to include all records from the left table ([Util Selection 2]
) even if there are no matching records in the right table ([Util Selection 3]
). The WHERE
clause filters the results to only include rows where the PHANT
column in [Util Selection 3]
is null.
Breakdown
1. SELECT [Util Selection 2].* FROM [Util Selection 2]
This line selects all columns (*
) from the [Util Selection 2]
table and assigns the alias .*
. This is equivalent to selecting every column in the table, including any that may not have been explicitly named.
2. LEFT JOIN [Util Selection 3] ON [Util Selection 2].prt = [Util Selection 3].PRDNO
This line performs a LEFT JOIN
between the [Util Selection 2]
and [Util Selection 3]
tables based on the join condition:
- The left table is
[Util Selection 2]
. - The right table is
[Util Selection 3]
. - The join column in the left table is
prt
. - The join column in the right table is
PRDNO
.
The resulting table contains all columns from both tables. If there are no matching rows in the right table, the result will contain null values for the columns from the right table.
3. WHERE ((([Util Selection 3].PHANT) Is Null))
This line filters the results to only include rows where:
- The value in the
PHANT
column of the[Util Selection 3]
table is null. - The
Is Null
keyword is used to check for null values.
The query will return all columns from the left table ([Util Selection 2]
) for which there are no matching rows in the right table ([Util Selection 3]
) and where the PHANT
column is null.