无效的对象名称[dbo]。[udfKnowGoldCount]

时间:2017-09-18 10:46:39

标签: sql sql-server

我正在制作一个用户定义的函数,每件事情都很好。当我尝试使用我的函数时,我收到此错误消息:

  

无效的对象名称[dbo]。[udfKnowGoldCount]。

USE [ahsitsindia_sunriseprod]
GO
-- count silver member for gold claim
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER FUNCTION [dbo].[udfKnowGoldCount] (@uid BIGINT)

RETURNS BIGINT

BEGIN

return (select count(MemberClub) from [dbo].[UserMaster] where PlacementID=@uid and MemberClub='Silver')
END

这是我的问题:

if((select dbo.udfKnowGoldCount(@TempPlacementID))=4) 
begin 

UPDATE [dbo].[UserMaster] SET [MemberClub]='Gold' WHERE [UserID]=@TempPlacementID 

end

0 个答案:

没有答案