oracle—spool—时间变量
来源:互联网 发布:深圳立诺软件 编辑:程序博客网 时间:2024/05/18 02:42
ismpsmp1@zxin10[/home/zxin10/task/mazongxiao]more test.sh
sqlplus zxdbm_ismp/zxin_smap <<EOF
@/home/zxin10/task/mazongxiao/test.sql
/
column spf new_value spf noprint
select '/home/zxin10/task/mazongxiao/'||to_char(sysdate,'yyyymmdd')||'.txt' spf from dual;
spool &spf
@/home/zxin10/task/mazongxiao/unload.sql
spool off
EOF
ismpsmp1@zxin10[/home/zxin10/task/mazongxiao]more test.sql
declare
dd varchar(8);
num int;
begin
select to_char(sysdate-1,'yyyymmdd')into dd from dual;
select count(1) into num from user_tables where table_name='MA_TEST1';
if num>0 then
execute immediate 'drop table ma_test1';
end if;
execute immediate 'create table ma_test1 as (select col001,count(*) cc from test where col001 = '''||dd||''' group by col001)';
end;
ismpsmp1@zxin10[/home/zxin10/task/mazongxiao]more unload.sql
select * from ma_test1;
ismpsmp1@zxin10[/home/zxin10/task/mazongxiao]
- oracle—spool—时间变量
- spool Oracle
- Oracle spool
- Oracle Spool
- ORACLE SPOOL
- ORACLE spool
- oracle spool
- Oracle get、start、edit、spool命令,临时变量、已定义变量
- oracle插入时间变量
- Oracle spool 用法小结
- Oracle spool 用法小结
- Oracle spool 用法小结
- Oracle spool 用法小结
- Oracle spool 用法小结
- Oracle spool 用法小结
- Oracle spool 用法小结
- ORACLE SPOOL 用法小结
- Oracle spool 用法
- 字符串去掉汉字只是留下字母
- 一个简单的UDP广播例子(含C/S)
- oracle批量提交
- 支持多浏览器的图片预览
- 常用正则表达式收藏
- oracle—spool—时间变量
- jsp自定义分页标签
- 表名作变量
- ubuntu下将pdf转换成jpg
- Trim(Right(Left(ValueOfString, End_Pos), End_Pos - begin_Pos + 1))
- JPA中的继承映射
- MyEclipse 不能新建web project
- 如何开发线程安全的servlet
- 使用游标将一张表导入另一张表