We help IT Professionals succeed at work.
Get Started

Query to select item with substatus

Last Modified: 2012-08-20
Hello experts,

Need your help to write query please. I have a table that contains thousands of update activities of various items.  The item is defined as US_ID. I want to be able to pull just a unique list of US_ID that have never been updated with 'CS' yupe.

 Here is the sample data

AB0009AAA9      20-Nov-00            MG            CP
AB0009AAA9      13-Feb-02            MG            CP
AB0009AAA9      02-Aug-07            MG            CP
AB0009AAA9      28-Nov-08            CS            CP
FI000M2ED8      23-Nov-01            MD            CP
FI000M2ED8      06-Jan-06            MD            CP
FI00170WD6      30-Mar-01            AD            CP
FI00170WD6      16-Oct-09            CS            CP

The query should only result is the US_ID = FI000M2ED8  because it has never been updated with UPDATE_TYPE = 'CS'
Watch Question
Project Architect
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE