I have the following function
create function MaxOf
(@Value1 sql_variant, @Value2 sql_variant)
RETURNS sql_variant
AS
BEGIN
DECLARE @MaxValue sql_variant
select @MaxValue = max(valu)
from
(select @Value1 valu
union
select @Value2) t
RETURN @MaxValue
END
When I run this
select maxof(1,2)
I get the following error
Server: Msg 195, Level 15, State 10, Line 1
'maxof' is not a recognized function name.
I am running SQL 2000 on W2K, latest service packs installed on both.
create function MaxOf
(@Value1 sql_variant, @Value2 sql_variant)
RETURNS sql_variant
AS
BEGIN
DECLARE @MaxValue sql_variant
select @MaxValue = max(valu)
from
(select @Value1 valu
union
select @Value2) t
RETURN @MaxValue
END
When I run this
select maxof(1,2)
I get the following error
Server: Msg 195, Level 15, State 10, Line 1
'maxof' is not a recognized function name.
I am running SQL 2000 on W2K, latest service packs installed on both.