# KBBLP1A0-2 Analysis generated on: 4/2/2025 10:00:45 AM --- ## SQL Statement ```sql SELECT [RMSFILES#_KBBLP1A0].PRDNO, Left$([prdno],1) AS lpn, [RMSFILES#_KBBLP1A0].KBLWH, [RMSFILES#_KBBLP1A0].SSIZE1, [RMSFILES#_KBBLP1A0].SSIZE2, [RMSFILES#_KBBLP1A0].SSIZE3, [RMSFILES#_KBBLP1A0].SSIZE4, [RMSFILES#_KBBLP1A0].SSIZE5, [RMSFILES#_KBBLP1A0].BSIZE1, [RMSFILES#_KBBLP1A0].BSIZE2, [RMSFILES#_KBBLP1A0].BSIZE3, [RMSFILES#_KBBLP1A0].BSIZE4, [RMSFILES#_KBBLP1A0].BSIZE5, [RMSFILES#_KBBLP1A0].TSIZE1, [RMSFILES#_KBBLP1A0].TSIZE2, [RMSFILES#_KBBLP1A0].TSIZE3, [RMSFILES#_KBBLP1A0].TSIZE4, [RMSFILES#_KBBLP1A0].TSIZE5 FROM [RMSFILES#_KBBLP1A0] WHERE (((Left$([prdno],1))="2")) ORDER BY [RMSFILES#_KBBLP1A0].PRDNO; ``` ## Dependencies - [[Tables/[RMSFILES__KBBLP1A0]]] ## Parameters - *None* ## What it does **SQL Query Description** This SQL query retrieves specific columns from the `[RMSFILES#_KBBLP1A0]` table and filters the results based on a condition. ### SELECT Statement The `SELECT` statement is used to select specific columns from the `[RMSFILES#_KBBLP1A0]` table. The selected columns include: * `PRDNO` * `lpn` (derived from `Left$([prdno],1)`) * Various size-related columns: + `KBLWH`, `SSIZE1` to `SSIZE5` + `BSIZE1` to `BSIZE5` + `TSIZE1` to `TSIZE5` ### WHERE Clause The `WHERE` clause filters the results based on a condition: * The `Left$([prdno],1)` function extracts the first character of the `PRDNO` value. * The condition `((Left$([prdno],1))="2")` checks if the first character of the `PRDNO` value is equal to "2". ### ORDER BY Clause The `ORDER BY` clause sorts the filtered results based on the `PRDNO` column. ### Query Details * The query uses a table alias `[RMSFILES#_KBBLP1A0]` to refer to the original table. * The query assumes that the `Left$([prdno],1)` function is defined in the database and returns the first character of the `PRDNO` value. * The query filters the results to only include rows where the first character of the `PRDNO` value is "2". * The query sorts the filtered results based on the `PRDNO` column. **Example Output** The query will return a result set containing the selected columns for each row in the `[RMSFILES#_KBBLP1A0]` table where the first character of the `PRDNO` value is "2". The output may look something like this: | PRDNO | lpn | KBLWH | SSIZE1 | ... | TSIZE5 | | --- | --- | --- | --- | ... | --- | | 12 | 12 | ... | ... | ... | ... | | 25 | 25 | ... | ... | ... | ... | Note that the actual output will depend on the data in the `[RMSFILES#_KBBLP1A0]` table.