1.7 KiB
1.7 KiB
K_NUM_1
Analysis generated on: 4/2/2025 10:00:22 AM
SQL Statement
SELECT DISTINCTROW AddnlQ1.PartNumber, AddnlQ1.OPCode, AddnlQ1.Machine, AddnlQ1.RunStd
FROM AddnlQ1
WHERE (((Left$(UCase$([PartNumber]),1))="K"));
Dependencies
Parameters
- None
What it does
SQL Query Description
This SQL query retrieves distinct rows from the AddnlQ1
table based on a specific condition.
Overview
The query selects unique values for three columns: PartNumber
, OPCode
, and Machine
. The selection is constrained by a regular expression pattern applied to the PartNumber
column.
Query Breakdown
- SELECT DISTINCTROW: This clause specifies that only distinct rows should be returned in the result set.
- AddnlQ1.PartNumber, AddnlQ1.OPCode, AddnlQ1.Machine: These columns are selected for retrieval from the
AddnlQ1
table. - FROM AddnlQ1: The query selects data from the
AddnlQ1
table. - WHERE (((Left$(UCase$([PartNumber]),1))="K")):
- This clause applies a conditional filter to the data.
Left$(...)
: Extracts the first character from the string using theLeft
function.UCase$(...)
: Converts the string to uppercase using theUCase
function.[PartNumber]
: Specifies that the expression should be applied to thePartNumber
column.
Condition
The condition ((Left$(UCase$([PartNumber]),1))="K")
checks if the first character of the uppercase PartNumber
is equal to 'K'. If this condition is true, the row is included in the result set.
Result
The query returns a distinct subset of rows from the AddnlQ1
table where the PartNumber
starts with the letter 'K', and includes unique values for OPCode
, Machine
, and RunStd
.