ora-00979
Date: Tue, 03 Jun 2003 21:56:01 GMT
Message-ID: <RP8Da.6261$QF2.1573782_at_news2.telusplanet.net>
When I run the following select I get ora-00979 when running it under oracle 9.2 but running it under oracle 8.1.7 it works fine, does anyone know what would be the problem. the following is what generates the error, it seems to be caused by the sub select using the MAX function.Its kind of strange since Im not usign group by at all. Has oracle 9 changed they way it handles this?
scott
SELECT DISTINCT wb.wellbore_name,
t.tour_id,
c.final_operations_date,
0.0 final_td,
(SELECT MIN(tour_start_date) FROM tour where project_id = pl.project_id) spud_date,
p.problem_days,
wb.business_unit,
wb.district_id
FROM wellbore wb,
well w,
project_location pl,
project p,
completion c,
tour t
WHERE wb.wellbore_id = w.wellbore_id
AND w.well_id = pl.location_id
AND p.proj_type_id = 444
AND pl.project_id = p.project_id
AND pl.project_id = c.project_id
AND pl.project_id = t.project_id
AND t.transfer_code < 3
AND ( pl.project_id = 20934 ) ;
ORA-00979: not a GROUP BY expression Received on Tue Jun 03 2003 - 23:56:01 CEST