函数中含有的 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
[解决办法]
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
[解决办法]
if exists(select * from table1 where a=@dDate) set @re=1else set @re=0
[解决办法]