Hi I have a table called EMPDET with Emplid and Deptid as keys and values are as shown below.
Emplid Deptid Desc
1 A TEST
2 A TEST
3 A ABC
4 A TEST
5 B XYZ
6 B XYZ
7 B xyz
8 C TEST2
9 C STH
10 C TEST2
11 D STG
12 D STG
13 D STG
I need to write a query which will fetch below results. It should pick only dupilcate combination
Expected results:
A TEST
A ABC
C STH
C TEST2
Thanks,
Kris
| Title | Under | Posted on |
|---|---|---|
| MD5 - SHA checksum of a file. | PeopleSoft Technical | 02/07/2012 - 5:29am |
| nVision Tabular Report through PIA with prompts | PeopleSoft Technical | 02/02/2012 - 10:07pm |
| Can we create an AE to mass update Position - Jobcode data? | PeopleSoft Technical | 01/18/2012 - 3:11am |
| Pay Components on job data can be defaulted and setup based on the rules? | PeopleSoft Functional | 01/05/2012 - 4:58am |
Try this
Select deptid, desc from EMPDET group by deptid, desc having count(deptid, desc) >1 .
Aman
Post new comment