だから誰でも動物保護施設マネージャーに精通しているなら、私はいくつかの助けを探しています。私は最初はreturn "SELECT ac.*, ac.ID AS ACID,
はどういう意味animalcontrol.pyこのPython/SQLコードは何をしますか?
def get_animalcontrol_query(dbo):
return "SELECT ac.*, ac.ID AS ACID, s.SpeciesName, x.Sex AS SexName, " \
"co.OwnerName AS CallerName, co.HomeTelephone, co.WorkTelephone, co.MobileTelephone, " \
"o1.OwnerName AS OwnerName, o1.OwnerName AS OwnerName1, o2.OwnerName AS OwnerName2, o3.OwnerName AS OwnerName3, " \
"o1.OwnerName AS SuspectName, o1.OwnerAddress AS SuspectAddress, o1.OwnerTown AS SuspectTown, o1.OwnerCounty AS SuspectCounty, o1.OwnerPostcode AS SuspectPostcode, " \
"o1.HomeTelephone AS SuspectHomeTelephone, o1.WorkTelephone AS SuspectWorkTelephone, o1.MobileTelephone AS SuspectMobileTelephone, " \
"vo.OwnerName AS VictimName, vo.OwnerAddress AS VictimAddress, vo.OwnerTown AS VictimTown, vo.OwnerCounty AS VictimCounty, vo.OwnerPostcode AS VictimPostcode," \
"vo.HomeTelephone AS VictimHomeTelephone, vo.WorkTelephone AS VictimWorkTelephone, vo.MobileTelephone AS VictimMobileTelephone, " \
"ti.IncidentName, ci.CompletedName, pl.LocationName " \
"FROM animalcontrol ac " \
"LEFT OUTER JOIN species s ON s.ID = ac.SpeciesID " \
"LEFT OUTER JOIN lksex x ON x.ID = ac.Sex " \
"LEFT OUTER JOIN owner co ON co.ID = ac.CallerID " \
"LEFT OUTER JOIN owner o1 ON o1.ID = ac.OwnerID " \
"LEFT OUTER JOIN owner o2 ON o2.ID = ac.Owner2ID " \
"LEFT OUTER JOIN owner o3 ON o3.ID = ac.Owner3ID " \
"LEFT OUTER JOIN owner vo ON vo.ID = ac.VictimID " \
"LEFT OUTER JOIN pickuplocation pl ON pl.ID = ac.PickupLocationID " \
"LEFT OUTER JOIN incidenttype ti ON ti.ID = ac.IncidentTypeID " \
"LEFT OUTER JOIN incidentcompleted ci ON ci.ID = ac.IncidentCompletedID"
から
..ですコードの各行が何を意味するのかを把握しようとしています。
このコードと現在のコードとを異なるものにしたいのであれば、私は変更する必要があります。 ei "ac"または「ACID」
私は私はあなたが参照したコードがanimalcontrolテーブルからすべての行を選択しても、種に含まれている全てのデータを結合し、lksexさdef get_animalcontrol_query(dbo):
'ac.ID as ACID'は、出力では、列名が' ac.ID'ではなく 'ACID'になることを意味します。 –
ご協力いただきありがとうございます! –
だから「SELECT ac。*」と答えたとき 何を指していますか? –