函数中含有的 SELECT 语句无法向客户端返回数据(在线) create Function IsOtherRestDay(@dDate smallDatetime ) returns int as begin declare @re int select * from table1 where a=@dDate If @@rowcount >0
set @re=1 Else set @re=0
return (@re)
end
------解决方案--------------------
SQL code
create Function IsOtherRestDay(@dDate smallDatetime )
returns int
as
begin
declare @re int
if exists(select * from table1 where a=@dDate)
set @re=1
Else
set @re=0
return (@re)
end
------解决方案--------------------
SQL code
if exists(select * from table1 where a=@dDate)
set @re=1
else
set @re=0
------解决方案--------------------