Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> group by problem on converted view
I have been converting a sybase database to oracle and I am having problems
with this view and others similar.
However my oracle version does not work as I get an error with my group by
expressions
any help in how I could make this work would be most welcome.
THE ORIGINAL SYBASE VIEW:
sum(tblItem.quantity), (select Estimate from dba.v_testestimate where (socimstest.laboratory = v_testestimate.laboratoryID or v_testestimate.agencyID = socimstest.laboratory) and socimstest.test = v_testestimate.testid and Range = (select MAX(Range) from dba.v_testestimate where (socimstest.laboratory = v_testestimate.laboratoryID or v_testestimate.agencyID = socimstest.laboratory) and socimstest.test = v_testestimate.testid and Range <= sum(tblItem.Quantity) ) )
dba.tblItem on testxexhibit.exhibitid = tblItem.Itemid group by socimstest.id,socimstest.laboratory,socimstest.test
BELOW IS THE ORACLE VERSION I AM WORKING ON:
sum(tblItem.quantity), (select Estimate from cme.v_testestimate where (socimstest.laboratory = v_testestimate.laboratoryID or v_testestimate.agencyID = socimstest.laboratory) and socimstest.test = v_testestimate.testid and Range = (select MAX(Range) from cme.v_testestimate where (socimstest.laboratory = v_testestimate.laboratoryID or v_testestimate.agencyID = socimstest.laboratory) and socimstest.test = v_testestimate.testid and Range <= sum(tblItem.Quantity) ) )
cme.socimstest,cme.testxexhibit,cme.tblItem where
socimstest.id = testxexhibit.testid and testxexhibit.exhibitid = tblItem.Itemid group by socimstest.id,socimstest.laboratory,socimstest.test ;
thanks for any help Received on Tue Aug 28 2001 - 04:54:39 CDT