All Forums General
aairan 1 post Joined 12/13
17 Dec 2013
Oracle to Teradata query conversion

Can anyone help me in conversting below oracle query part  into Teradata.
 
COUNT (DISTINCT (
case when column1 in ('aaa' , 'bbb')
 and column2 is null then column3
end )) OVER ( partition by some_col, some_col)
 
Thanks so much.

Raja_KT 1246 posts Joined 07/09
17 Dec 2013

Hi,
A quick look at the code, I can see that when you remove distinct, it works. Now since you may land up without distinct( i.e duplicates), then you can think of putting this in a derived query and then take only the distinct results.
You can verify with data.
Cheers,
Raja

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.