# Filtered Parts rstd Analysis generated on: 4/2/2025 9:59:48 AM --- ## SQL Statement ```sql SELECT Trim([RMSFILES#_IEMUP1A0].[PRDNO])+[REVLVL] AS PN, [RMSFILES#_IEMUP1A0].ACTIV, [RMSFILES#_IEMUP1A0].USAGE, [RMSFILES#_IEMUP1A0].DESCP, [RMSFILES#_IEMUP1A0].ITTYP, Format([CSMTM],"0.00000") AS Crstd, Format([WRKC2],"000") AS FWC2, Format([WRKC3],"000") AS FWC3, Format([OPCDE],"000") AS FOPC FROM [RMSFILES#_IEMUP1A0] LEFT JOIN [Compare Rstd] ON [RMSFILES#_IEMUP1A0].PRDNO = [Compare Rstd].PRDNO WHERE ((([RMSFILES#_IEMUP1A0].ACTIV)="1")); ``` ## Dependencies - [[Tables/[RMSFILES__IEMUP1A0]]] ## Parameters - *None* ## What it does **SQL Query Description** ========================== This SQL query retrieves data from the `[RMSFILES#_IEMUP1A0]` table and performs several transformations on the selected columns. **Query Details** ----------------- ### 1. Selecting Columns The query selects the following columns: * `Trim([RMSFILES#_IEMUP1A0].[PRDNO])`: Trims the leading spaces from the `PRDNO` column. * `[REVLVL]`: The original value of the `REVLVL` column. * `[RMSFILES#_IEMUP1A0].ACTIV`: The original value of the `ACTIV` column. * `[RMSFILES#_IEMUP1A0].USAGE`: The original value of the `USAGE` column. * `[RMSFILES#_IEMUP1A0].DESCP`: The original value of the `DESCP` column. * `[RMSFILES#_IEMUP1A0].ITTYP`: The original value of the `ITTYP` column. * `Format([CSMTM],"0.00000")`: Formats the `CSMTM` column as a decimal number with two digits after the decimal point. * `Format([WRKC2],"000")`: Formats the `WRKC2` column as an integer with leading zeros to a minimum width of three characters. * `Format([WRKC3],"000")`: Formats the `WRKC3` column as an integer with leading zeros to a minimum width of three characters. * `Format([OPCDE],"000")`: Formats the `OPCDE` column as an integer with leading zeros to a minimum width of four characters. ### 2. Joining Tables The query performs a left join with the `[Compare Rstd]` table on the `PRDNO` column. This allows the query to include data from both tables, even if there is no match in the `[Compare Rstd]` table. ### 3. Filtering Data The query filters the data to only include rows where the value of the `ACTIV` column is equal to '1'. **Query Output** ----------------- The query returns a result set with the transformed columns and the joined data from both tables, filtered by the `ACTIV` column. **Note**: The exact output will depend on the data in the `[RMSFILES#_IEMUP1A0]` and `[Compare Rstd]` tables.