i have a table
col1
10
20
30
40
10
20
50
my requirement is how to retrive only duplicates like
10
10
20
20
like this how it's possible in SQL?
Answer Posted / ramesh
SQL:
1. SELECT A.COL1 FROM TABLE1 A
2. ( SELECT COL1, COUNT(COL1)FROM TABLE1
GROUP BY (COL1)
HAVING COUNT(COL1)=1)B
WHERE
3. A.COL1<>B.COL1
RESULT : 1. 10 20 30 40 10 20 50
2. 30 40 50
3. 10 10 20 20
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many types of stage?
What are the features of datastage flow designer?
what is 'reconsideration error' and how can i respond to this error and how to debug this
Differentiate between hash file and sequential file?
How will you move hashed file from one location to another location?
Explain the datastage parallel extender (px) or enterprise edition (ee)?
Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.
Define APT_CONFIG in Datastage?
Explain ibm infosphere information server and highlight its main features?
How do you reject records in a transformer?
how to sort two columns in single job in datastage.
What are the functionalities of link partitioner and link collector?
Explain the situation where you have applied SCD in your project?
Difference between in process and inter process?
file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4