日期:2014-05-17 浏览次数:20715 次
create or replace function Union_TIMECARDDATA(v_ID nvarchar2,v_Date Varchar2) return varchar2 as v_s varchar2(1000); begin v_s := ''; for rec in(Select TimeCardTime From ATDTIMECARDDATA Where PERSONID=v_ID And TimeCardDate=v_Date Order By PERSONID,TimeCardDate,TimeCardTime ) loop v_s := v_s||rec.TimeCardTime||','; end loop; v_s := substr(v_s,1,length(v_s)-1); return v_s; end; /