[mySQL] convert

Résolu/Fermé
jacinthe87 Messages postés 194 Date d'inscription mercredi 4 février 2009 Statut Membre Dernière intervention 15 juillet 2010 - 20 mai 2009 à 01:40
Christounet Messages postés 1264 Date d'inscription mercredi 26 septembre 2007 Statut Membre Dernière intervention 29 juillet 2010 - 20 mai 2009 à 10:22
Bonjour,
voila ma requête:
SELECT champ1, champ2 FROM tabl order by convert(SUBSTRING(champ1, 0,2),int) 
 LIMIT 0 , 20 

voila l'erreur:
#1064 - Erreur de syntaxe près de 'int) LIMIT 0 , 20' à la ligne 1

de l'aide SVP!
A voir également:

1 réponse

Christounet Messages postés 1264 Date d'inscription mercredi 26 septembre 2007 Statut Membre Dernière intervention 29 juillet 2010 1 384
20 mai 2009 à 10:22
Bonjour,

Je pense que le code devrait être le suivant
SELECT champ1, champ2 FROM tabl order by convert(SUBSTRING(champ1, 0,2),signed integer) 
 LIMIT 0 , 20

A plus
1