[mySQL] convert

Résolu
jacinthe87 Messages postés 194 Date d'inscription   Statut Membre Dernière intervention   -  
Christounet Messages postés 1264 Date d'inscription   Statut Membre Dernière intervention   -
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   Statut Membre Dernière intervention   1 392
 
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