sql: error creating a function

ALTER    FUNCTION test (
             @c1 int,
             @c2 VARCHAR(50),
           @c3 VARCHAR(10)
)
RETURNS VARCHAR(8000)AS
BEGIN

END --FUNCTION

but getting an error :

Server: Msg 208, Level 16, State 6, Procedure test, Line 24
Invalid object name 'test.

How can i fix that problem?
gogosharAsked:
Who is Participating?
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
Hello gogoshar,

'ALTER' is used to alter an existing function, in order to create a function use 'CREATE' instead of ALTER

CREATE Function dbo.Test (


Aneesh R
0
 
gogosharAuthor Commented:
thanks
0
All Courses

From novice to tech pro — start learning today.