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

CodePudding user response:

You give me the statement run out or 16...

CodePudding user response:

refer to the second floor qq_25949165 response:
left join gdrereg. "MrSoilCert" br on t. "AcceptID"=br. "AcceptID" why do I always run tip undefined column?? I see all it


T this table

CodePudding user response:

This problem has been solved the operation result is the same as I wrote is 16 o data but the br. The field "SoilUseTo" remove is 4 it's driving me crazy

CodePudding user response:

refer to 6th floor qq_25949165 response:
this problem has been solved the operation result is the same as I wrote is 16 o data but the br. The field "SoilUseTo" remove is 4 it's driving me crazy


Above a br. "OrCertNo" is now added br. "SoilUseTo meng meng's
"
Groupby grouping of projects with different combinations is often a result of course, what do you want?

CodePudding user response:

Hey hey wrong field name is br "OrCertNo"

CodePudding user response:

refer to the eighth floor qq_25949165 response:
hey hey wrong field name is br "OrCertNo"


Without br. "OrCertNo" group is four
Each is implied the four different "OrCertNo", so to add the group. "OrCertNo" after the result is 16,
Hope is still 4, you will need to clear for different. "OrCertNo" in which one, with aggregate functions (Max) to take, rather than to the group

CodePudding user response:

Problem is I now need the four different "OrCertNo display can be repeated," if I use the Max value is lost three data such as, display is not correct

CodePudding user response:

references to the tenth floor qq_25949165 response:
problem is I now need the four different "OrCertNo display can be repeated," if I use the Max value is lost three data such as ah, display is not correct


That's not 16, do you want to OrCertNo1, OrCertNo2, OrCertNo3, OrCertNo4.,,,,,,, on display in one line? To have 10000
Ask questions you have to say clear, I don't know what will you do

CodePudding user response:

I want to put the picture 1 and picture 2 two 4 records, merged into a table shows out

CodePudding user response:

What is the key of the merger, didn't you, so unconditional merge into a cartesian product 16, this
?
You this two queries to remove the rownum respectively, and then use rownum do merge key,
Two number query results may not be consistent attention with external connection
  • Related