Filtering Data

  • We have part id's in our database with an SRTN or RTN extension.

    For example:

    1133521-2 RTN

    1133500-5 SRTN

    I would like my query to only show part id's with a "RTN" extension, however when I use a wildcard it shows both extension. Any idea how I can get around this? Here is what I have.

    SELECT WO.BASE_ID, WO.PART_ID, WO.WAREHOUSE_ID, O.RESOURCE_ID

    FROM WORK_ORDER WO

    JOIN OPERATION O ON WO.BASE_ID = O.WORKORDER_BASE_ID

    WHERE WO.WAREHOUSE_ID = 'PSP' AND

    WO.PART_ID LIKE '%RTN' AND

    O.STATUS = 'C' AND

    O.RESOURCE_ID IN ('Rep.Assy.Test', 'Quality Control', 'Kitting', 'WO Review', 'Rep Evaluation')

  • WO.PART_ID LIKE '% RTN' AND

    Is the space always before the RTN?

    -- Cory

  • I feel stupid! Gotta love Monday's!

    Thanks. I appreciate it very much.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply