Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decode function error

Status
Not open for further replies.

naga5566

Technical User
Mar 14, 2003
90
US
Hi all
I am using this and i am getting error ora:00937 not a single group group function.Any idea y this is so

DECODE(Tab1.BOOK_VALUE,0,1,sum((Tab2.Coll/Tab1.Col1)*100))

Thanks
Naga
 
It is this
DECODE(Tab1.Col1,0,1,sum((Tab2.Coll/Tab1.Col1)*100))
 
What are you going to do?
Which on this the search value and which one is the result ?
 
Nimmy,
Its like this .I am implementing this in a measure object in designer.

If table1.col1 is 0 then it should be assumed as 1 using decode.Else i need to perform the calculation
Sum(Tabl1e2.Coll/Tabl11.Col1)*100


I think this is bit clear now.
 
If you look at the SQL generated it will be not be grouping by Tab1.Col1... So put the Sum outside the Decode and it should work....

Sri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top