Solved

sql: error creating a function

Posted on 2007-12-04
2
185 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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