PSLine2000Documentation/Queries/Filtered Parts 3.md

2.0 KiB

Filtered Parts 3

Analysis generated on: 4/2/2025 9:59:33 AM

SQL Statement

SELECT Trim([PRDNO])+[REVLVL] AS PN, [RMSFILES#_IEMUP1A0].PRDNO, [RMSFILES#_IEMUP1A0].ACTIV, [RMSFILES#_IEMUP1A0].USAGE, [RMSFILES#_IEMUP1A0].DESCP, [RMSFILES#_IEMUP1A0].ITTYP, [RMSFILES#_IEMUP1A0].HOUSE
FROM [RMSFILES#_IEMUP1A0]
WHERE ((([RMSFILES#_IEMUP1A0].ACTIV)="1"));

Dependencies

Parameters

  • None

What it does

SQL Query Description

Overview

This SQL query retrieves data from the [RMSFILES#_IEMUP1A0] table and performs filtering based on specific conditions.

What the Query Does

The query selects data from the [RMSFILES#_IEMUP1A0] table where the ACTIV column equals "1". The selected columns are then manipulated using the Trim() function to remove leading and trailing spaces, and a new column named PN is created by concatenating the result of this operation with the [PRDNO] column.

Selected Columns

The query selects the following columns from the [RMSFILES#_IEMUP1A0] table:

  • PRDNO: The product number.
  • ACTIV: A boolean indicator of whether the record is active or not.
  • USAGE: The usage information for the record.
  • DESCP: The description of the record.
  • ITTYP: The type of ITT (Informational Technical Task).
  • HOUSE: The house information.

Filtering

The query filters the data to only include records where the ACTIV column equals "1". This means that only active records are returned in the results.

Additional Operation

A new column named PN is created by concatenating the result of the Trim() function applied to [PRDNO] with the original value of [PRDNO]. This effectively removes any leading or trailing spaces from the product number and combines it with the original value.

Query Output

The query returns a table containing the filtered data, with the new PN column added as a result of concatenating the trimmed [PRDNO] with itself.