Posted by parez on 10/18/05 23:08
Hi All!
This is the first time i am tryin to write a sql server 2000 function.
I need to clean up some of my stored procedures..
Can any one please give me skeleton for a userdefined function or
correct my function. I get the following error.
Select statements included within a function cannot return data to a
client.
This returns a bit and it does a query to the database to decide the
value of the bit
CREATE FUNCTION GoodAd
(@adid int,@currentdate datetime)
RETURNS bit
AS
BEGIN
declare @Return bit
select @return = 1
if exists (select null from adqas where adid=@adid)
select @return 0
return @return
end
Navigation:
[Reply to this message]
|