Forum de discussion
Forum « Programmation ASP » (archives)
Re: Erreur d'une requête SQL
Envoyé: 30 janvier 2004, 5h47 par Oznog
Dificile à dire, tu me dis que ces deux codes fonctionne?
<%set rstest = Conn.Execute("select Distinct a.CpsSeasonName, a.CpsSeasonCode, a.CpsID, c.ClassName FROM F_CHampionShipSeason a, F_Event b, F_Class c WHERE a.CPsID = b.CpsID AND a.CpsID = c.CpsID AND a.CpsSeasonYear = 2004 AND right(left(a.CpsSeasonCode,2),1) = 0 ORDER BY a.CpsSeasonCode")%>
- ET -
<%set rstest = Conn.Execute("select Distinct a.CpsSeasonName, a.CpsSeasonCode, a.CpsID, c.ClassName FROM F_CHampionShipSeason a, F_Event b, F_Class c WHERE a.CPsID = b.CpsID AND a.CpsID = c.CpsID AND a.CpsSeasonYear = 2004 AND right(left(a.CpsSeasonCode,2),1) = 1 ORDER BY a.CpsSeasonCode")%>
Hum, si tu ajoute cette parenthèse (car il la faut) ça devrait fonctionner, essai en même temps avec le "*" pour voir :
<%set rstest = Conn.Execute("select Distinct * FROM F_CHampionShipSeason a, F_Event b, F_Class c WHERE a.CPsID = b.CpsID AND a.CpsID = c.CpsID AND a.CpsSeasonYear = 2004 AND (right(left(a.CpsSeasonCode,2),1) = 1 OR right(left(a.CpsSeasonCode,2),1) = 0) ORDER BY a.CpsSeasonCode")%>
Ciao
Oznog
Réponses
|