Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sp_who_3 I can't create it.

Author  Topic 

dbthj
Posting Yak Master

143 Posts

Posted - 2007-10-01 : 11:06:54
Anybody had this problem?? Whether I try to parse the .sql code to create sp_who_3 or whether I try to execute it, I get an error.

Server: Msg 156, Level 15, State 17, Line 54
Incorrect syntax near the keyword 'OPENROWSET'.

It seems to be complaining about this part of the code:


SELECT @input_buffer = CAST(text AS VARCHAR(8000))
FROM OPENROWSET(fngetsql, @sql_handle)
WHERE encrypted = 0

I have tried it in a couple of SQL 2000 SP4 instances with the same result.
I have tried re-copying the code to make sure I got it all.

It looks really nifty and I would very much like to have it in my
toolbox.

Kristen
Test

22859 Posts

Posted - 2007-10-01 : 11:22:45
Where is sp_who_3 source code coming from?
Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-10-01 : 11:51:37
I have seen it here http://vyaskn.tripod.com/sp_who3.htm
and in the book "Gurus Guide to Transact SQL" by Ken Henderson, I think it is the first version I linked that the OP is referring to.







Future guru in the making.
Go to Top of Page

dbthj
Posting Yak Master

143 Posts

Posted - 2007-10-01 : 16:57:43
Righto !!. The parse fails, but the execution succeeds.

Thanks.
Go to Top of Page
   

- Advertisement -