Hi, I cannot understand the error because I'm not trying to convert to numeric the variable @FQTROQ.
declare @FQTROQ varchar(30)
declare @FQNUTQ decimal(6,0)
set @FQTROQ = 'R-354'
set @FQNUTQ = 100
SELECT ( CASE WHEN (@FQTROQ is not null and @FQTROQ <> '')
THEN ( @FQTROQ )
ELSE ( @FQNUTQ ) END ) AS Numero_Troquel
Any help? thanks