CREATE OR REPLACE PROCEDURE p_getEmp(ptime timestamp,ltime timestamp, o OUT SYS_REFCURSOR) IS tp timestamp;
tp:=ptime;
BEGIN
while tp<=ltime loop
tp=tp+1;
OPEN o FOR
select
(select count(fid) from T_SHE_FDCCUSTOMER c
where c.freceptiontypeid='dpNwoAEbEADgABNYwKgSwmv0964='
and to_char(c.flastupdatetime,'yyyy-mm-dd')=tp)
+
(select count(fid) from T_SHE_TrackRecord t
where t.freceptiontypeid='dpNwoAEbEADgABNYwKgSwmv0964='
and to_char(c.flastupdatetime,'yyyy-mm-dd')=tp)
from dual
end loop
END;
就是这个意思,哪位大侠指点下,应该怎么写
tp:=ptime;
BEGIN
while tp<=ltime loop
tp=tp+1;
OPEN o FOR
select
(select count(fid) from T_SHE_FDCCUSTOMER c
where c.freceptiontypeid='dpNwoAEbEADgABNYwKgSwmv0964='
and to_char(c.flastupdatetime,'yyyy-mm-dd')=tp)
+
(select count(fid) from T_SHE_TrackRecord t
where t.freceptiontypeid='dpNwoAEbEADgABNYwKgSwmv0964='
and to_char(c.flastupdatetime,'yyyy-mm-dd')=tp)
from dual
end loop
END;
就是这个意思,哪位大侠指点下,应该怎么写
解决方案 »
- Oracle EBS 急
- 急急急...在线等!!
- ORACLE中处理number数据问题 急救
- Oracle 里的NUMBER 不是自增的字段吗?
- 又一道sql题
- 提两人关于数据库口令认证的问题。
- Oracle的function如何能返回一个自定义的表
- 将多个表a1,a2...(结构一样)的某些字段的数据导到一个表b(b的结构包含a需要导的字段,另外多出字段a没有的,想在导的时候插进去个变量)里面
- 怎么样看到Oracle某个用户下有多少张表和每张表的字段数,记录数??
- 请问如何把这句SQL Server格式的sql改为oracle格式的sql呢?
- oracle 触发器的问题!
- oracle 语句优化
同样内容在sql server版的回复:http://topic.csdn.net/u/20110925/21/73054207-c7f0-4c5c-ac22-025c23e00fb9.html?43216