All Forums Database
Meena k 2 posts Joined 10/14
29 Oct 2014
teradata SQL query

Hi, can any one help me giving the code to this query?
I have a Customer table which have duplicate rows. In that table
I. I want only unique rows.
2. I want only Duplicate rows ( if in Table unique rows exist, i don't want them to display)
Thank you

Raja_KT 1246 posts Joined 07/09
29 Oct 2014

You can create table as  with data with a select query something like this:
select id,id1..... from your_table
qualify row_number() over(partition by id,id1..... order by id,id1.....)>1 or =1

Raja K Thaw
My wiki:
Street Children suffer not by their fault. We can help them if we want.

Meena k 2 posts Joined 10/14
29 Oct 2014

Thank you Raj,
I Will try it.

You must sign in to leave a comment.