Ver Mensaje Individual
  #3  
Antiguo 15-04-2010
ingel ingel is offline
Miembro
 
Registrado: jun 2003
Posts: 244
Reputación: 24
ingel Va por buen camino
no da error pero ...

Hola Federico ...
Estoy probando lo que me sugeris en el Query analizer ...
el codigo quedo algo asi ....

Código SQL [-]
declare @var varchar(50)
declare @res varchar(10)

set @var = ' and EMPLEADO=158'

set @res=  ( select top 1 CARACTER from TABLA where  serie='A' 
and (@var IS NULL ))
print @res

pero @var No es Null ...

yo necesitaria solo :

Código SQL [-]
set @res=  ( select top 1 CARACTER from TABLA where  serie='A' 
and (@var ))

... pero da error ...

Gracias...
Responder Con Cita