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
What are the functionalities of link partitioner and link collector?
What is job control?
How to reverse the string using unix?
Define meta stage?
how to add a new records into source?
What are the repository tables in datastage?
What are stage variables and constants?
What is the difference between validated and compiled in the datastage?
What is ibm datastage?
How do y read Sequential file from job control?
What is "fatal error/rdbms code 3996" error?
Define project in datastage?
What are the benefits of datastage?
On which interface you will be working as a developer?
How to convert RGB Value to Hexadecimal values in datastage?