RETURNS  @temp2 (pronum char(10),presort int,nowin int,nowout int,nowsort int)第二行修改如上

解决方案 »

  1.   

    RETURNS  @temp2 table (pronum char(10),presort int,nowin int,nowout int,nowsort int)
    修改如上
      

  2.   

    改成你这个就没有报错啦RETURNS  @temp2 table (pronum char(10),presort int,nowin int,nowout int,nowsort int)
      

  3.   

    to  zjcxc(邹建)
    这个我已经该了,还是returns报错
      

  4.   

    --我估你是想实现这样的功能吧?CREATE FUNCTION everday  ()
    RETURNS  @temp1 table (pronum char(10),presort int,nowin int,nowout int,nowsort int)
    AS  
    BEGIN 
    insert into @temp1(pronum,nowsort,presort) select a.pronum,nowsort=a.number,presort=b.number from pro_product a left outer join pro_daynumber b on a.pronum=b.pronum where b.modtime=(select max(modtime) from pro_daynumber)and a.classes<>'组合'update @temp1 set nowin=a.nownum  from pro_ioput a,@temp1 b where a.pronum =b.pronum and a.type=1
    update @temp1 set nowout =a.nownum from pro_ioput a,@temp1 b where a.pronum = b.pronum and a.type=2return 
    END
      

  5.   

    我也不知道,刚刚是了在begin下声明表,也没有报错