Solved

sql: error creating a function

Posted on 2007-12-04
2
184 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql help 2 45
SQL Syntax: How to force case sensitive query? 2 44
MS SQL Server time between records 14 46
SQL - format decimal in a string 5 39
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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