E
eantar
Can someone help on this.
I've got a UDF Scalar Function that works fine in on database, but when
I try to copy the same UDF to another database I get syntax error
messages.
The function is:
ALTER FUNCTION dbo.GetDateFilled
(
@dateAt1 datetime,
@dateAt2 datetime,
@dateEndActual datetime
)
RETURNS datetime
AS
BEGIN
Declare @dateFilled datetime
If @dateAt1 Is Not Null And @dateAt2 Is Null
set @dateFilled = @dateAt1
Else
If @dateAt1 Is Null And @dateAt2 Is Not Null
set @dateFilled = @dateAt2
Else
If @dateAt1 Is Null And @dateAt2 Is Null
set @dateFilled = @dateEndActual
Else
Set @dateFilled = @dateAt1
RETURN @dateFilled
END
And this isn't the only UDF I can't import from one DB to another. It
seems that I can't import any???
Any ideas would be greatly appreciated:
ea
I've got a UDF Scalar Function that works fine in on database, but when
I try to copy the same UDF to another database I get syntax error
messages.
The function is:
ALTER FUNCTION dbo.GetDateFilled
(
@dateAt1 datetime,
@dateAt2 datetime,
@dateEndActual datetime
)
RETURNS datetime
AS
BEGIN
Declare @dateFilled datetime
If @dateAt1 Is Not Null And @dateAt2 Is Null
set @dateFilled = @dateAt1
Else
If @dateAt1 Is Null And @dateAt2 Is Not Null
set @dateFilled = @dateAt2
Else
If @dateAt1 Is Null And @dateAt2 Is Null
set @dateFilled = @dateEndActual
Else
Set @dateFilled = @dateAt1
RETURN @dateFilled
END
And this isn't the only UDF I can't import from one DB to another. It
seems that I can't import any???
Any ideas would be greatly appreciated:
ea