函数作业
    --函数
create function fnGetAllAccept(@SDate datetime, @wh_id int, @cust_id int)
returns table as
             return (select Acc_code, Cust_id, Acc_type, Acc_remark
             from AcceptBlotter
              where Wh_id = @wh_id AND cust_id = @cust_id AND Acc_date >= @SDate
  ) 
--测试
select * from fnGetAllAccept('2000-1-1', 10, 100)