Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a function

Status
Not open for further replies.

Inwoner

Programmer
May 22, 2000
66
ZA
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.
 
Fully qualify the function name as dbo.maxof(1,2)

________________________________________________________________________________
If you do not like change, get out of the IT business...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top