代碼波紋管不工作,有什麼想法爲什麼?TSQL字符串串聯在WHILE循環中不工作?
declare @Counter int
set @Counter = 0
declare @ConcText nvarchar(1000)
while @Counter < 5
begin
--set @ConcText = @ConcText + cast(@Counter as nvarchar(10)) + N' counter,'
--set @ConcText = @ConcText + convert(nvarchar(10), @Counter) + N' counter,'
set @ConcText = @ConcText + N' counter,'
set @Counter = @Counter + 1
end
print @ConcText --<-- this is null, why ??
定義「不工作」什麼是吐出來。它應該吐出什麼? – TheTXI 2009-03-05 14:51:10