Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/11/2013, 10:21
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: Como dar valor a un DECLARE @variable ?

Código SQL:
Ver original
  1. DECLARE @StatusAux VARCHAR(20)
  2.  
  3. IF @STATUS <> ''
  4. SET @StatusAux = 'AND Status = ' + @STATUS
  5. ELSE
  6. SET @StatusAux = ''
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me