hztech

导航

ORACLE小错误和小技巧

1.dblink过程中出现了ORA-01017: invalid username/password; logon denied ORA-02063: 紧接着 line (起自 CONN_YIXUN)

出现这个错误的原因是由于双方的版本不一致造成的,我们需要对用双引号将密码引起来,否则密码会被自动转化为大写:

2.ORA-01843无效的月份

to_date(R.STADATE,'yyyyMMdd')换成to_char(to_date(R.STADATE,'yyyy-MM-dd'),'yyyymmdd')

3.用UTL_FILE.PUT_LINE的时候记得对字符串长度有限制

4.如果想在控制台显示输出要用:set serveroutput on;

3.oracle把秒数转换成具体日期

转载地址:http://cache.baiducontent.com/c?m=9d78d513d99e01fc09b3c3690c66c0101d43f6612bd6a00209d2843c94732a405016e5ac26520774d1d20a6416ae394b9bfa2104301451b38cbefb5ddccb855e2a9f5447671df65662d20edec05124b137e05bfede12f0bb8025e2afc5a4af40148a0d0a20c6b6c94d0167d772a04a6cb6b1993f441e46e6fa3012a30e3134c5741bf610a5ba653547d6aac00f0c8571813f468af962f66d49eb52b91a102046a647b0&p=c278ca1992934eaf5bedd32d0214bb&newp=c9769a478ad811a058ee94257f52c4231610db2151d3db1123cf&user=baidu&fm=sc&query=oracle%D6%D0%D4%F5%C3%B4%B0%D1%C8%D5%C6%DA%D7%AA%B3%C9%B3%C9%C3%EB&qid=ff15abc80000914f&p1=3

SELECT TO_DATE('1970-1-1','YYYY-MM-DD')+(155556848/(3600*24))  FROM DUAL

posted on 2015-03-16 18:20  TheViolin  阅读(380)  评论(0编辑  收藏  举报