on 10-15-2009 7:08 AM
Hi Experts,
We are trying to apply this following function in MS SQL 2000 SP4:
USE [DB1]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date, ,>
-- Description: <Description, ,>
-- =============================================
ALTER FUNCTION [dbo].[@DEF_XLL]
(
-- Add the parameters for the function here
@Val nvarchar(MAX),
@PadChar nvarchar(1),
@Length int
)
RETURNS nvarchar(MAX)
AS
BEGIN
-- Return the result of the function
RETURN replicate(@PadChar,@Length-len(@Val)) + @Val
END
but it failed. The error message is "incorrect syntax near returns. Must declare the variable '@Padchar'. Pls give adv. Thx
Rgd,
Steve
Hi
Thanks for answer. I manage to resolve this issue.
Rgd,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steve,
This might relates your error:
>ALTER FUNCTION cannot be used to change a scalar-valued function to a table-valued function, or vice versa. Also, ALTER FUNCTION cannot be used to change an inline function to a multistatement function, or vice versa.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.