September 28, 2010 at 7:43 am
I have created a function in SQL server 2005 to return the values without any space, my client system has SQL server 7.0.But the create function is
giving error: Incorrect syntax near function check the compatibility or upgrade to higher compatibility.My function is as simple as given below.
Let me know if there is any change in function syntax for SQL 7.0
CREATE function [dbo].[Fn_Replace]
(@keyword varchar (1000)
)
returns varchar(1000)
AS
BEGIN
SET @keyword=REPLACE(@keyword,' ','')
SET @keyword=REPLACE(@keyword,' ','')
SET @keyword=REPLACE(@keyword,' ','')
SET @keyword=REPLACE(@keyword,' ','')
SET @keyword=REPLACE(@keyword,' ','')
RETURN(@keyword)
END
GO
September 28, 2010 at 8:24 am
SQL Server version 7.0 doesn't support CREATE FUNCTION,
user-defined functions were introduced in MSSQL 2000. In 7.0, you still
have to use stored procedures.
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply