TRY:
select * from dbo.FUN_Bill('2003-03-11','2003-03-12')

解决方案 »

  1.   

    CrazyFor(蚂蚁) 
    不行!还是同样的错误。
      

  2.   

    system_bill_detail.p_count
    这个字段是什么类型的?
      

  3.   

    try
    ........... 
    INSERT @F_Bill
            SELECT dbo.system_bill_detail.p_num, dbo.system_production.p_name,ISNULL(SUM(dbo.system_bill_detail.p_count), 0) 
          AS p_count,  dbo.system_bill.b_type, 
          dbo.system_department.d_num
    FROM dbo.system_bill_detail INNER JOIN
    ..............
    我怀疑,你写的字段顺序不对
      

  4.   


       INSERT @F_Bill
            SELECT dbo.system_bill_detail.p_num, dbo.system_production.p_name ISNULL(SUM(dbo.system_bill_detail.p_count), 0) 
          AS p_count,dbo.system_bill.b_type, 
          dbo.system_department.d_num
    顺序不对