[dba-SQLServer] User Defined Function error

Francisco Tapia fhtapia at gmail.com
Thu Sep 8 11:58:49 CDT 2005


how about not calling it dbo.MyFunction, what about just "MyFunction"


On 9/8/05, Mark.Whittinghill at protective.com <
Mark.Whittinghill at protective.com> wrote:
> 
> I am trying to make a user defined function, and no matter what I do I
> keep getting the error
> 
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'FUNCTION'.
> 
> It is always finding an error in the CREATE FUNCTION line. I can't even
> get dummy function to work
> 
> CREATE FUNCTION dbo.MyFunction(@MyParameter int)
> RETURNS int AS
> BEGIN
> DECLARE @MyVar int
> SET @MyVar=1
> RETURN @MyVar
> END
> 
> 
> Any ideas?
> 
> 
> 
> 
> -----------------------------------------
> Confidentiality Notice: This e-mail communication and any attachments
> may contain confidential and privileged information for the use of the
> designated recipients named above. If you are not the intended
> recipient, you are hereby notified that you have received this
> communication in error and that any review, disclosure, dissemination,
> distribution or copying of it or its contents is prohibited. If you
> have received this communication in error, please notify me immediately
> by replying to this message and deleting it from your computer. Thank
> you.
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 
> 


-- 
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...



More information about the dba-SQLServer mailing list