jl66
asked on
Request a high efficient query
Have a table T with the following data
T (c1 number(10), c2 varchar2(10))
c1 c2
1 B
1 C
2 A
3 D
4 A
4 A
5 A
5 B
6 C
6 A
6 D
7 E
8 B
8 C
....
Now want to get all C1 with only C2=A (single and duplicates). For the above example,
Want to get the records:
c1
2
4
Since C2 in all of the records are 'A', they are selected..
T (c1 number(10), c2 varchar2(10))
c1 c2
1 B
1 C
2 A
3 D
4 A
4 A
5 A
5 B
6 C
6 A
6 D
7 E
8 B
8 C
....
Now want to get all C1 with only C2=A (single and duplicates). For the above example,
Want to get the records:
c1
2
4
Since C2 in all of the records are 'A', they are selected..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the catch on the typo.
ASKER
The query is quite efficient. Thanks a lot for both.