syed afroz

syed afroz

  • NA
  • 54
  • 0

Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fnMinValue", or the name is ambiguous

Aug 13 2010 7:09 AM
Hi!

I've created a UDF to find the min of two integer values as

CREATE FUNCTION dbo.fnMinValue
               (@ColumnA MONEY,
                @ColumnB MONEY)
RETURNS MONEY
AS
  BEGIN
    RETURN (0.5 * ((@ColumnA + @ColumnB) - abs(@ColumnA - @ColumnB)))
  END

and I'm calling this UDF in folloeing format

SELECT cast(dbo.fnMinValue ( @lcount,@Rcount) as int)

when i execute this in server it gives the following error

Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fnMinValue", or the name is ambiguous.

Plz help me out..


Answers (1)