Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot create a function
Message
From
03/01/2006 12:53:11
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Cannot create a function
Miscellaneous
Thread ID:
01082707
Message ID:
01082707
Views:
61
I'm trying to create a simple function
CREATE FUNCTION Add2Numbers (@X INT, @Y INT)
RETURNS INT
AS
BEGIN
   DECLARE @Z INT
   SET @Z = @X + @Y
   RETURN(@Z)
END
Getting error:
"Error 170: Line1: Incorrect syntax near 'FUNCTION'.
Must declare the variable '@X'.
A RETURN statement with a return value cannot be used in this context."
Next
Reply
Map
View

Click here to load this message in the networking platform