为什么没有显示结果?我觉得一切都很好,它应该可以工作,但是当我打印输出变量时,它什么都不打印
let seconds = watch.elapsd.truncatingRemainder(dividingBy: 60)
let ten0fseconds = (watch.elapsd * 10).truncatingRemainder(dividingBy: 10)
答案 0 :(得分:0)
您需要在动态SQL中分配@Result变量:
DECLARE @Result NVARCHAR(20)
DECLARE @Qry NVARCHAR(MAX)
-- assign the @Result inside the dynamic SQL
SET @Qry='select @Result=[forid1].[2/17/2017] from [forid1]'
EXECUTE Sp_executesql @Qry, N'@Result NVARCHAR(20) OUTPUT', @Result OUTPUT;
print ' value is : ' + @Result ;