做报表 要么用 PLSQL Developer 要么自己在SQL PLUS中自定义格式把 select * from 生产入仓表 where 日期=to_date(输入日期,'YYYY/MM/DD')
如: select * from 生产入仓表 where to_char(日期,'yyyymmdd')=20030510 group by 物料编号;
select * from 生产入仓表 where 日期=输入日期 這種也要用存儲結構?
CREATE OR REPLACE PACKAGE pkg_test AS TYPE myrctype IS REF CURSOR; END pkg_test; /create procedure getrepro(p_date in date,p_rc out pkg_test.myrctype) as str varchar2(50); begin str:='select * from 生产入仓表 where trunc(日期)=trunc('||p_date||')'; open p_rc for str; end; /
要么自己在SQL PLUS中自定义格式把
select * from 生产入仓表 where 日期=to_date(输入日期,'YYYY/MM/DD')
select * from 生产入仓表 where to_char(日期,'yyyymmdd')=20030510 group by 物料编号;
這種也要用存儲結構?
AS
TYPE myrctype IS REF CURSOR;
END pkg_test;
/create procedure getrepro(p_date in date,p_rc out pkg_test.myrctype)
as
str varchar2(50);
begin
str:='select * from 生产入仓表 where trunc(日期)=trunc('||p_date||')';
open p_rc for str;
end;
/
[email protected]