Bring out the result only once

  • Thread starter Thread starter Al Mackay
  • Start date Start date
A

Al Mackay

Hi, another query....

I would like to be able to report out either Yes or No whether a
condition exists against a record.

e.g. table exists, as per below

Unique No: Approval: Description:
1 Tech Testing
1 Tech Testing
1 Tech Testing
2 Admin Testing
4 Tech dmfk
5 Tech adsfkjdf
3 Tech adjkljpasd

As There are 3 occurences of tech entries against unique entry 1, this
appears 3 times as new rows.

I would like to be able to report out based on the following:

If any record has approval = tech, bring out one line with the Unique
No and Description, if it doesn't don't bring anything out.

Is this possible to restrict the data coming out within the query?

Many Thanks, Al ( (e-mail address removed) )
 
SQL would look something like:


SELECT DISTINCT [Unique No], Approval, [Description]
FROM YourTable
WHERE Approval = "Tech"
 
Back
Top