Ver Mensaje Individual
  #10 (permalink)  
Antiguo 14/08/2014, 10:02
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Extraer datos especificos de una columna

Algo como esto:

Código SQL:
Ver original
  1. DECLARE @variable VARCHAR(MAX)
  2. SET @variable='Site Index=252, Cell Index=252, Alarm Cause=Other causes, Site Type=BTS3900E, Site Name=S_YOMBLON, Cell Name=AM02520, Cell CGI=716-06-1041-4f1a'
  3. SELECT SUBSTRING(SUBSTRING(@variable,charindex('S_',@variable,1),len(@variable)),1,(charindex(',',SUBSTRING(@variable,charindex('S_',@variable,1),len(@variable)),1))-1)

Saludos!
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me