PSLine2000Documentation/Queries/Processes by material 4.md

45 lines
2.0 KiB
Markdown

# Processes by material 4
Analysis generated on: 4/2/2025 10:06:51 AM
---
## SQL Statement
```sql
SELECT Process.*
FROM [Process by material 2] LEFT JOIN Process ON [Process by material 2].PN = Process.PartNumber;
```
## Dependencies
- [[Tables/Process]]
## Parameters
- *None*
## What it does
**SQL Query Description**
==========================
The provided SQL query retrieves data from two tables: `[Process by material 2]` and `Process`. It performs a left join operation to combine rows from both tables based on the matching values in the `PN` column of `[Process by material 2]` and the `PartNumber` column of the `Process` table.
**Query Details**
-----------------
### Tables Involved
* `[Process by material 2]`: The source table, which contains data about processes related to a specific material.
* `Process`: The target table, which contains general process information.
### Join Type
The query uses a left join operation. This means that all rows from the `[Process by material 2]` table will be included in the results, and the corresponding rows from the `Process` table will be added to the results if there is a match in the `PN` column.
### Column Selection
The query selects only the columns (`*`) from the `Process` table. This means that data from both tables will be combined based on the join condition, but only the columns from the `Process` table are included in the output.
**Join Condition**
-----------------
The join condition is based on matching values in the `PN` column of `[Process by material 2]` and the `PartNumber` column of the `Process` table. This means that if a record exists in the `[Process by material 2]` table with a specific `PN`, the corresponding record from the `Process` table will be joined on the same value.
**Result**
------------
The final result set will contain all columns (`*`) from the `Process` table, combined with data from the `[Process by material 2]` table based on the join condition. The resulting rows will include data from both tables for each matching process record.