Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem in using sum with distinct in case

574323Apr 27 2007 — edited Apr 27 2007
Hi all,

I want to use a sum function with distinct and also with case.
below is the format i am using.
Sum( distinct case when a.value='TOOL' then e.value else 0 end)
This is working but i don't get distinct records.
SO i tried using in this way
Sum( case when a.value='TOOL' then distinct e.value else 0 end)
But I am getting missing expression error.
Please help me to resolve this issue


Thanks
Priya
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2007
Added on Apr 27 2007
10 comments
1,129 views