CREATE FUNCTION getsort (@first varchar(100),@second varchar(100))
RETURNS  int
AS
BEGIN

declare @rv int

if(@first=@second) set @rv=1
     else
set @rv=0
    -- Return the result of the function
    RETURN @rv

END
GO

05-11 21:57