Ver Mensaje Individual
  #5 (permalink)  
Antiguo 02/09/2013, 01:28
ccliment
 
Fecha de Ingreso: julio-2013
Mensajes: 87
Antigüedad: 10 años, 9 meses
Puntos: 9
Respuesta: Necesito obtener el maximo valor de una tabla

Intenta probar esto a ver si te funciona:

Código SQL:
Ver original
  1. SELECT *
  2. FROM archivo
  3. WHERE cod LIKE 'M%'
  4. ORDER BY CAST(SUBSTRING(cod, 2) AS SIGNED INTEGER) DESC
  5. LIMIT 1