Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why? Help
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01344439
Message ID:
01344452
Views:
13
Yes, any T-SQL statement affects @@ROWCOUNT. You should store it value in a local variable if you are intending to use it later.

>I have a debug problem. When running this code (just a small snippet) with the print statement, I have no problem, but if I remove the print statement or move it above the select, I end up in a loop. Does the print effect the @@Rowcount some how?
>
>
>	SELECT @RoomDate = RoomDate, @DeptId = DeptId, @DeptDesc = DeptDesc, 
@RoomId = RoomId, @RoomName = RoomName, @SpaceStart = SpaceStart, @SpaceEnd = SpaceEnd, @SpaceMinutes = SpaceMinutes 
>	FROM @OUTPUT 
>	WHERE ID = @TempId
>	
>        print 'Test'
>
>	WHILE(@@ROWCOUNT > 0)
>	BEGIN
>
>
>Thanks for any thoughts.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform