Rode isto
declare @d int
select @d = 500
if cast(sql_variant_property(@d,'BaseType') as varchar(20)) = 'int'
print 'yes'
else
print 'no'
declare @d int
select @d = 500
if cast(sql_variant_property(@d,'BaseType') as varchar(20)) = 'int'
print 'yes'
else
print 'no'