Bonjour,
J'ai une vieille application qui tourne sous du Mysql 3.x
En en passant sur une version plus récente 5 j'ai une erreur de requête dans une application web :
En cherchant sur le web il semble que le probleme vienne d'ici :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 SELECT m.IdMachine, m.IdUtilisateur, m.IdLabo, m.NomMachine, m.TypeMachine, i.IdInterface, i.NumeroIpInterface, i.NomDNSInterface, pm.IdPriseMurale, pm.IdBaie, pm.PiecePriseMurale, pm.NumeroPriseMurale, po.IdPort, po.Numeroport, c.IdCommutateur, c.NomCommutateur, b.IdBaie, b.NomBaie FROM machine AS m LEFT JOIN interface AS i USING (IdMachine) LEFT OUTER JOIN prise_murale AS pm USING (IdPriseMurale) LEFT OUTER JOIN port AS po USING (IdPriseMurale) LEFT JOIN commutateur AS c USING (IdCommutateur) LEFT JOIN baie AS b USING (IdBaie) WHERE m.IdLabo='10' #1052 - Column 'IdBaie' in from clause is ambiguous
N'étant pas un spécialiste du SQL, je voudrais savoir si un de vous pouvez me donner la bonne syntaxe pour cette requete.Join Processing Changes in MySQL 5.0.12.
Beginning with MySQL 5.0.12, natural joins and joins with USING, including outer join variants, are processed according to the SQL:2003 standard. The goal was to align the syntax and semantics of MySQL with respect to NATURAL JOIN and JOIN ... USING according to SQL:2003. However, these changes in join processing can result in different output columns for some joins. Also, some queries that appeared to work correctly in older versions must be rewritten to comply with the standard.
Merci par avance pour votre aide
Partager