73 lines
2.3 KiB
Markdown
73 lines
2.3 KiB
Markdown
# Util Make Select 0
|
|
Analysis generated on: 4/2/2025 10:13:56 AM
|
|
---
|
|
## SQL Statement
|
|
```sql
|
|
SELECT "x X X" AS BestSheetSet, Process.* INTO [Util Selection 0]
|
|
FROM [Util Make Duplicate Revision Remover 2] LEFT JOIN Process ON [Util Make Duplicate Revision Remover 2].PN = Process.PartNumber
|
|
WHERE (((Process.MetalType)=[Forms]![Utilization on Multiple Sheets]![Combo12]));
|
|
|
|
```
|
|
## Dependencies
|
|
- [[Tables/Process]]
|
|
## Parameters
|
|
- [Forms]![Utilization on Multiple Sheets]![Combo12] (Empty)
|
|
## What it does
|
|
**SQL Query Description**
|
|
==========================
|
|
|
|
### Overview
|
|
|
|
This SQL query retrieves data from two tables, `[Util Make Duplicate Revision Remover 2]` and `Process`, based on a specific condition related to metal type. The result is stored in a new table called `[Util Selection 0]`.
|
|
|
|
### Query Breakdown
|
|
|
|
#### Table Join
|
|
---------------
|
|
|
|
The query performs an outer join between the two tables:
|
|
|
|
```markdown
|
|
FROM [Util Make Duplicate Revision Remover 2] LEFT JOIN Process ON [Util Make Duplicate Revision Remover 2].PN = Process.PartNumber
|
|
```
|
|
|
|
This allows the query to retrieve data from both tables, including rows with no match in either table (thanks to the `LEFT` join).
|
|
|
|
#### Filter Condition
|
|
-------------------
|
|
|
|
The query applies a filter condition based on the metal type:
|
|
|
|
```markdown
|
|
WHERE (((Process.MetalType)=[Forms]![Utilization on Multiple Sheets]![Combo12]));
|
|
```
|
|
|
|
This uses the `Forms!Utilization on Multiple Sheets!Combo12` value as the condition for filtering. The actual value is likely a dropdown selection or text input field, and its contents are being used to restrict the data retrieval.
|
|
|
|
#### Select Statement
|
|
-------------------
|
|
|
|
The query selects specific columns from the `Process` table:
|
|
|
|
```markdown
|
|
SELECT Process.* INTO [Util Selection 0]
|
|
```
|
|
|
|
This retrieves all columns (`*`) from the `Process` table and stores them in a new table called `[Util Selection 0]`.
|
|
|
|
#### Alias
|
|
---------
|
|
|
|
An alias is assigned to the result set:
|
|
|
|
```markdown
|
|
AS BestSheetSet
|
|
```
|
|
|
|
This gives the result table an alias of `BestSheetSet`, which can be useful for referencing the result in subsequent queries.
|
|
|
|
**Result**
|
|
----------
|
|
|
|
The final result is a new table called `[Util Selection 0]` containing all columns from the `Process` table, filtered by the metal type specified in the `Forms!Utilization on Multiple Sheets!Combo12` field.
|