How can we help you today? How can we help you today?
ksrangsy

Activity overview

Latest activity by ksrangsy

I left out one thing from the example code, so I will post it again. if (object_id('dbo.prTmp) is not null) drop proc dbo.prTmp go create proc dbo.prTmp @intEmployeeID int=Null , @intReturnCode int=NULL output , @chvErrorMessage varchar(255)=NULL output /********************************************************** Object: dbo.prTmp Description: ... Usage: dbo.prTmp @intReturnCode output = 0 for success, otherwise there is an error, @chvErrorMessage output = error message if any Returns: lastName, firstName $Workfile: prTmp.sql $ $Author: ... $. Email: ... $Revision: x.y $ Example: exec dbo.prTmp; Created: .... $Modtime: ... $. **********************************************************/ as set nocount on if (@intEmployeeID Is Null) Goto Help select lastName, firstName from employee (NoLock) where employeeID = @intEmployeeID @error Help: Exec sp_usage @objectName = 'dbo.prTmp' , @desc = '...' , @parameters='@intEmployeeID, ...' , @example='exec dbo.prTmp ;' , @returns='lastName, firstName' , @author='...' , @workfile='prTmp.sql' , @email='...' , @version='x', @revision='y' , @datecreated='...', @datelastchanged='...' return -1 go grant execute on dbo.prTmp to execprocs go when executing just the stored procedure name, the message returned is what's in the comments directly after the parameters in the stored procedure, copy & paste. But if I copy one line at a time and create the newline characters myself, then SQL Prompt works perfectly. So I think it has something to do with the newline character when mass copying comments from the "Messages" result set. So I guess I'm going to have to change my commenting style, commenting style develope by my predicessor, or is there something else I can do ... / comments
I left out one thing from the example code, so I will post it again. if (object_id('dbo.prTmp) is not null) drop proc dbo.prTmp go create proc dbo.prTmp@intEmployeeID int=Null , @intReturnCode int=...
0 votes
Thanks for both replies. I tried opening up a stored procedure from a solution-project on my machine w/ SQL Studio 2005 and comment out the header and footer and SQL Prompt still doesn't kick in. Here some example code that I use for all the stored procedures: if (object_id('dbo.prTmp) is not null) drop proc dbo.prTmp go create proc dbo.prTmp @intEmployeeID int=Null , @intReturnCode int=NULL output , @chvErrorMessage varchar(255)=NULL output as set nocount on if (@intEmployeeID Is Null) Goto Help select lastName, firstName from employee (NoLock) where employeeID = @intEmployeeID @error Help: Exec sp_usage @objectName = 'dbo.prTmp' , @desc = '...' , @parameters='@intEmployeeID, ...' , @example='exec dbo.prTmp ;' , @returns='lastName, firstName' , @author='...' , @workfile='prTmp.sql' , @email='...' , @version='x', @revision='y' , @datecreated='...', @datelastchanged='...' return -1 go grant execute on dbo.prTmp to execprocs go Also, when I copy a stored procedure into a new query analyzer and type select * from <ctl>+<space> "in the body" of the stored procedure, like in the example above, I get @intReturnCode (stored procedure parameter) instead of table names. But if I do it before I drop the procedure at the very beginning (example code above), SQL Prompt works perfectly from a stored procedure in a solution or new query. Again, thanks for everyones help. / comments
Thanks for both replies. I tried opening up a stored procedure from a solution-project on my machine w/ SQL Studio 2005 and comment out the header and footer and SQL Prompt still doesn't kick in. ...
0 votes
SQL Prompt - Stored Procedures/Functions/Views
Hi, I was just wondering if anyone else is experiencing difficulties using SQL Prompt in existing Stored Procedure/Functions/Views. Because I get returned variable names that I locally declared wi...
4 followers 8 comments 0 votes