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 is the difference between odbc and drs stage?
What is the difference between server job and parallel jobs?
Name the different types of Lookups in Datastage?
How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...
what is the use of materialized view?
What are the repository tables in datastage?
In Informatica,for the table I can find coreesponding dependent mappings.Likewise can I find the dependent jobs with all the information by using the table name
Describe the main features of datastage?
What can we do with datastage director?
Difference between ‘validated ok’ and ‘compiled’ in data stage?
How many types of views are there in a datastage director?
What are some prerequisites for datastage?
I have a few records just I want to store data in to targets cycling way how?
How to read multiple files using a single datastage job if files have the same metadata?
What are stage variables and constants?