write a sql query following table some duplicate present
1
1
2
2
3
3
4
5
i want the output unique one column duplicate another
column following format like
unique duplicate
1 1
2 2
3 3
4
5
Answers were Sorted based on User's Feedback
Answer / babu
Hi,
SELECT DISTINCT(DEPTNO) UNIQ,E.DUP FROM EMP
LEFT OUTER JOIN
(SELECT DEPTNO DUP FROM EMP GROUP BY DEPTNO HAVING COUNT
(DEPTNO)>1) E
ON (EMP.DEPTNO=E.DUP)
please correct me if any thing wrong.
Thanks,
Babu
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / nagarau puppala
select distinct country_id "unique", (case when count(country_id) > 1 then country_id else null end) "duplicate" from s_region
group by country_id order by duplicate;
| Is This Answer Correct ? | 3 Yes | 4 No |
Enlist the differences between database and data warehouse.
Why can't we connect 2 active transformations to an active transformation ? Ex:- One aggriagator and one sq trans to an router transformation
suppose if we have dublicate records in a table temp n now i want to pass unique values to t1 n dublicat values to t2 in single mapping?how
My Source qualifier has empno, sal. Now my mapping is like SQ(EMPNO)->AGGR->EXP->TARGET SAL ------------>TARGET ? Is this mapping valid or any issues are there if we design like this?
what is galaxy repository?
how to run workflow in unix?
5 Answers Colgate, HP, Tech Mahindra,
How can yoU create or import flat file definition in to the warehouse designer?
How many joins in Informatica
What is aggregator transformation in informatica?
I have source like this 1:2;3. so i want to load the target as 123
What is difference between stored procedure transformation and external procedure transformation?
Source as 1 1 2 2 3 3 How to get target as 1 2 3 and 1 2 3