Display records not having particular code [message #255877] |
Thu, 02 August 2007 04:31 |
kumarvk
Messages: 214 Registered: July 2004
|
Senior Member |
|
|
Hi Experts,
I have a table with columns ID,TAG_NO,TAG_DATE,CODE. In this table the ID and CODE are unique.
for example
id tag_no tag_date code
1 ROO1 23-APR-07 T101
2 R001 23-APR-07 T102
3 R001 23-APR-07 T103
4 R001 23-APR-07 Z300
5 R002 23-APR-07 T101
6 R002 23-APR-07 T102
7 R003 23-APR-07 T101
8 R004 23-APR-07 T103
9 R004 23-APR-07 J101
10 R004 23-APR-07 J102
11 R005 23-APR-07 Z300
From this table I want to dislay only the tag_no don't have the code Z300.
I used the script like this
Select tag_no,tag_date from x where code != 'Z300' but it was displaying all the tag_no but I want my output like this be
TAG_NO
R001
R003
R004
Since R002 and R005 has used the code Z300. Can anyone help please?
|
|
|
|