oracle 时间查询
2015-08-12 15:08
465 查看
--查询上一月,下一月时+1SELECT pid,amount,unit,ntype from income.jk_bank_analyze WHERE ndate=add_months(to_date('2012-4-1','yyyy-MM-dd'),-1) and unit='HSP' and ntype=15
select add_months(sysdate,-1) from dual;
--查询上一日,下一日时+1select nvl(sum(t.amount),0) into shangri1 from income.jk_bank_dynamics_tmp t where t.ntype=1 and t.unit=in_unit and t.ndate=to_date(in_date,'yyyy-MM-dd')-1 --过滤重复数据
select add_months(sysdate,-1) from dual;
--查询上一日,下一日时+1select nvl(sum(t.amount),0) into shangri1 from income.jk_bank_dynamics_tmp t where t.ntype=1 and t.unit=in_unit and t.ndate=to_date(in_date,'yyyy-MM-dd')-1 --过滤重复数据
相关文章推荐
- Oracle jdbc DB2、Oracle、MySQL、PostgreSQL,并取当前时间。
- oracle 查询最后一条记录
- 各种数据库(oracle、mysql、sqlserver等)在Spring中数据源的配置和JDBC驱动包
- CPP/VCPP_连接Oracle数据库-OCILIB
- ORACLE基本数据类型总结
- oracle的nvl函数的用法
- 【Oracle】PL/SQL提取一段字符串中的每个字符
- Oracle中删除用户下所有对象
- 关于关于Linux 系统中 oracle lsnrctl 无法启动问题
- ORACLE EXP不能导出空表的原因分析及解决方法
- 我眼中的Oracle Database Software 和 Oracle Database
- oracle A用户访问B用户的表aa
- oracle 11g导出空表
- oracle sql 优化大全
- Oracle PL/SQL 嵌套表的使用
- linux平台下Oracle database的安装与/etc/redhat-release
- ORACLE学习之scott用户的表结构sql
- Oracle Database 12c cdb/pdb用户的创建
- ORACLE 11G在相同的linuxserver从实施例1满库到实例2上
- oracle中查看用户权限