January 21, 2003 at 5:45 pm
Hi,
While running the follwing from a query window, SET STATISTICS TIME is not working. Instead whatever I specify at Query window works and takes precedence.
"I STRONGLY DOUBT THAT SQL WINDOW HAS PRECEDENCE OVER ANYTHING ELSE"
I am running SQL 7 with sp3 on Windows workstation NT4. Any clues? Thanks Regards Gopi
CREATE PROCEDURE dbo.proc1 AS
declare @mycount as integer
SET STATISTICS TIME OFF
set nocount on
begin
set @mycount = (select count(*) from names)
select @mycount as 'number of total rows'
end
----SET STATISTICS TIME ON and SET NOCOUNT OFF..... I commented out here------
GO
Edited by - gopi on 01/21/2003 5:51:06 PM
January 21, 2003 at 9:10 pm
What are you trying to achieve here? The SET statements in your example wouldn't produce anything because they are after the CREATE command.
Setting STATISTICS TIME and NOCOUNT in the query window will turn the options on/off for the execution of the command.
Eg. If you set them on before your Create statement, you'll get stats on the execution of the Create statement.
If you turn the options on and then execute the procedure you've created, you'll get stats for the execute statement but not for the statements contained within the procedure.
Thanks
Phill Carter
--------------------
Colt 45 - the original point and click interface
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply