Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> by filtering with diferent

by filtering with diferent

From: valigula <valigula_at_gmail.com>
Date: 23 May 2007 08:16:09 -0700
Message-ID: <1179933369.587000.131310@h2g2000hsg.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US