• Because I pulled the data into a temporary table from the main db, this script wasn't working. I figured out that because I took the data as is, the field was of type CHAR(20)...and it's not something mentioned in my original post so you wouldn't have known. When I changed your script to...

    SELECT invoice_id

    FROM <YOURTABLE>

    WHERE LEFT(RTRIM(invoice_id), 6) NOT IN

    (

    SELECT DISTINCT LEFT(RTRIM(invoice_id), 6)

    FROM <YOURTABLE>

    WHERE (RIGHT(RTRIM(invoice_id), 4) = '0001')

    )

    ...it worked beautifully.

    Thanks for putting me on track with this.