July 24, 2009 at 8:49 am
Hello
I would like know how block to create a temporary stored procedure in SQL Server, versions 7 and 2k.
Nowadays, someone can to create using the command
create procedure #sp_name
Trully
José Ricardo Oviedo Ferreira
July 24, 2009 at 9:09 am
i just connected to a SQL 2000 instance and ran this code without errors; it returned the expected value; i don't have a SQL7 instance anymore.
select @@version = Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
CREATE PROCEDURE #MyPhoneNumberFormatter(@NUMBER varchar(20))
AS
BEGIN
IF LEN(@NUMBER) = 7
SET @NUMBER=STUFF(@NUMBER,4,0,'-')
SELECT @NUMBER
END
GO
Exec #MyPhoneNumberFormatter '8789961'
does that help?
Lowell
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply