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 Development (2000)
 stored procedure definition must include name...

Author  Topic 

Alonso_88
Starting Member

2 Posts

Posted - 2009-10-16 : 05:13:35
Hi Experts,


When applying this function in SQL server 2000:


USE [DBS]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE FUNCTION [dbo].[@PADL]
(
-- Add the parameters for the function here
@Val nvarchar(4000),
@PadChar nvarchar(1),
@Length int
)
RETURNS nvarchar(4000)
AS
BEGIN

-- Return the result of the function
RETURN replicate(@PadChar,@Length-len(@Val)) + @Val

END




I've got error message : "stored procedure definition must include name and text (for standard stredprocedure) or libraryname (for extended storedprocedure)"


Pls give advice how to resolve this problem. I appreciate your reply.


Rgd,

Alonso

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-16 : 05:22:49
Your posted code is for FUNCTION so why the error is about stored procedure?
Create <whatever> isn't able to take a variable as name.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Alonso_88
Starting Member

2 Posts

Posted - 2009-10-16 : 05:51:35
Hi Fred,



Thx for your answer. This issue is resolved. I have created this function in the UDF part.


Rgd,

Alonso
Go to Top of Page
   

- Advertisement -