0
我兩個動態變量...增加兩個動態變量,並將其存儲在INT型列
declare @count nvarchar(max)
declare @totalCount int
set @count = ' (SELECT COUNT(*) FROM '+ @Table +' where [Name] = '''+ CAST(@Name as nvarchar(max)) +''') '
set @totalCount = CAST(CAST(@count as nvarchar(max)) + CAST(@Qty as nvarchar(max)) as INT);
我得到一個錯誤
conversion failed when converting the nvarchar value to datatype int....
然後我需要存儲@totalCount在INT類型的[TotalCount]列中... PLease幫助