我有這個疑問導致這個錯誤:錯誤SQL條件的情況下未能轉換
Failed when converting the varchar value ')' to data type tinyint.
這是我的代碼有問題:
select
case t.name
when 'numeric'
then cast (c.precision + ')' as varchar(100))
end
from
sys.columns c
inner join
sys.types t ON t.user_type_id = c.user_type_id
inner join
sys.tables tb on tb.name = 'EX_EMPLOYEE'
where
c.name = 'B_CODE' and tb.object_id = c.object_id