[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] SQL question



Try:

begin-select
T.PTD_DEPT_NUMBER
T.CLASS_PDT_MNGR_NAME
from TABLENAME T
where 1 = (select count(*) from TABLENAME where PTD_DEPT_NUMBER =
T.PTD_DEPT_NUMBER)
end-select

-----Original Message-----
From: Vallabhu, Bindu [mailto:Bindu.Vallabhu@Staples.com]
Sent: Wednesday, August 27, 2003 10:27 AM
To: 'sqr-users@sqrug.org'
Subject: [sqr-users] SQL question


Hi Everybody,
I have a table with the below data. I need to ignore the rows where the
PDT_DEPT_NUMBER is repeated. for example i need to ignore departments 23 and
29 in the below data. Can somebody please tell me how i can do this. This is
on a db2 database.
Thank you,
Bindu

PDT_DEPT_NUMBER                 CLASS_PDT_MNGR_NAME

---------------
--------------------------------------------------
             10                         000031 - Alan Basmajian

             11                         000011 - Kari Freeman

             12                         000011 - Kari Freeman

             13                         000082 - Jessica Urquhart

             14                         000011 - Kari Freeman

             15                         000031 - Alan Basmajian

             16                         000082 - Jessica Urquhart

             17                         000031 - Alan Basmajian

             18                         000082 - Jessica Urquhart

             19                         000011 - Kari Freeman

             20                         000031 - Chris DiOrio

             21                         000045 - Bob Simek

             22                         000038 - Leslie Seegel

             23                         000038 - Leslie Seegel

             23                         000039 - James Emond

             24                         000009 - Marc Golding

             25                         000042 - Betsy Matuzek

             26                         000042 - Betsy Matuzek

             27                         000042 - Betsy Matuzek

             28                         000045 - Bob Simek       
             29                         000032 - Jeff Scheman

             29                         000039 - James Emond

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users