Home > database > Oracle increased br statement "OrCertNo" this field cannot be normal group
Oracle increased br statement "OrCertNo" this field cannot be normal group
Time:09-30
Select biz. "SoilUseArea", and "BuildArea," ba. "AcceptID," biz. "DoorPlate," biz. "RE_UnitNo," biz. "RE_SoilSeaCode," br. "OrCertNo," biz. "LayoutTypeName," br. "SoilUseTo," Max (ba. "AcceptID") The from gdrereg. "BizAccept" ba Left the join gdrereg. "BizHouseRelate" biz on ba. "AcceptID"=biz. "AcceptID "Left the join gdrereg. "MrSoilCert" br on ba. "AcceptID"=br. "AcceptID "Where ba. "AcceptID"='65432320170324000006' Group by biz. "SoilUseArea", and "BuildArea," ba. "AcceptID," biz. "DoorPlate," biz. "RE_UnitNo," biz. "RE_SoilSeaCode," biz. "LayoutTypeName," br. "SoilUseTo," br. "OrCertNo " Gdrereg. "BizAccept" one data, Gdrereg. "BizHouseRelate" four data, Gdrereg. "MrSoilCert" four data, Without br. "OrCertNo" the column, the result is 4 records, plus 16 records, this field is how to add this field can be achieved, the result is four records? [/img]
CodePudding user response:
select t. "SoilUseArea", "BuildArea," t. "AcceptID," t. "DoorPlate," t. "RE_UnitNo," t. "RE_SoilSeaCode," br. "OrCertNo," t. "LayoutTypeName", br. "SoilUseTo," Max (t. "AcceptID") The from ( Select biz. "SoilUseArea", "BuildArea," ba. "AcceptID," biz. "DoorPlate," biz. "RE_UnitNo," biz. "RE_SoilSeaCode," biz. "LayoutTypeName," ba. "AcceptID "The from gdrereg. "BizAccept" ba Left the join gdrereg. "BizHouseRelate" biz on ba. "AcceptID"=biz. "AcceptID "Where ba. "AcceptID"='65432320170324000006' ) t Left the join gdrereg. "MrSoilCert" br on ba. "AcceptID"=br. "AcceptID "-- where ba. "AcceptID"='65432320170324000006' Group by biz. "SoilUseArea", and "BuildArea," ba. "AcceptID," biz. "DoorPlate," biz. "RE_UnitNo," biz. "RE_SoilSeaCode," biz. "LayoutTypeName," br. "SoilUseTo," br. "OrCertNo "
Probably just want to do the two tables in front of the left after the matching correlation make subqueries, associated third table again
CodePudding user response:
Left the join gdrereg. "MrSoilCert" br on t. "AcceptID"=br. "AcceptID" why do I always run tip undefined column?? I see it properly
CodePudding user response:
I do not add group, I just left the join will be also prompted undefined column