Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> by filtering with diferent
Is it possible to filter duplicates codes by filtering with diferent
dates???
I have a table from where i load into my tables, that table has not got PK on cod1. When i try to load into my table1 found that there is a lot of duplicates.
So i am trying to group then as:
if date1 is not null then return date1 as data1 elseif data2 is not null then return data2 as data2 elseif data3 is not null then return data3 as data3
select distinct cod1, max (data1)
from table where date1 is not null group by grouping sets (cod1 , date1 )
this query returns some blanks that i dont know how to manage.
Anyone has any idea ??
Thanks in advance ..
A.
Received on Wed May 23 2007 - 10:16:09 CDT
![]() |
![]() |