Solved

sql: error creating a function

Posted on 2007-12-04
2
180 Views
Last Modified: 2010-03-20
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?
0
Comment
Question by:gogoshar
2 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 20402906
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
 

Author Comment

by:gogoshar
ID: 20402976
thanks
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now