Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/05/2010, 08:37
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Saber si es caracter o letra;

Código SQL:
Ver original
  1. postgres=> SELECT SUBSTRING('LA CONDE 375 ESQ. JUAREZ' FROM '[0-9]+');
  2.  SUBSTRING
  3. -----------
  4.  375
  5. (1 fila)
  6.  
  7. postgres=> SELECT SUBSTRING('LA CONDE 375.' FROM '[0-9]+');
  8.  SUBSTRING
  9. -----------
  10.  375
  11. (1 fila)

Este metodo se llama expresiones regulares. Puedes profundizar mas en el tema para obtener resultados mas certeros.

saludos
__________________
Without data, You are another person with an opinion.
W. Edwads Deming