![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
WaiteH
这个作者很懒,什么都没留下…
展开
-
Oracle密码过期ORA-28001或用户被锁
Oracle密码过期ORA-28001默认Oracle密码180天会过期,过期后登陆,会报异常ORA-28001: the password has expired如果是因为多次登录失败账户被锁定报错ORA-28000: the account is locked,则参考:《Oracle ORA-28000: the account is locked 多次登录失败用户被锁定》解决方法:1. SQL> sqlplus / as sysdba;...原创 2021-03-26 09:43:51 · 1028 阅读 · 1 评论 -
ORACLE expdp导出/导入以XX开头的所有表
expdp test/test directory=DATA_test_DIR dumpfile=test.dmp logfile=test.log tables=IAF%,WKF%原创 2020-07-30 10:35:19 · 907 阅读 · 0 评论 -
查询表对应的序列
create or replace procedure pro_Supplement_Leave_Mapping AS CURSOR TEMP_CUR IS select d.table_name, d.comments, t.num_rows from user_tab_comments d inner join user_tables t on d.table_name = t.TABLE_NAME left join user_col_comments c on ...原创 2020-07-23 14:44:19 · 2556 阅读 · 0 评论 -
序列的重置
declaren number(10);v_startnum number(10):=11;--从多少开始v_step number(10):=1;--步进tsql varchar2(200);v_seqname varchar2(200):='TEST';--序列名beginexecute immediate 'select '||v_seqname||'.nextval from dual' into n;n:=v_startnum-n-v_step;--从11开始tsql:='alt原创 2020-07-23 09:36:49 · 295 阅读 · 0 评论 -
导数据后,避免ID重复,全部序列增加10000
create or replace procedure pro_Supplement_Leave_Mapping1 AS CURSOR TEMP_CUR IS select SEQUENCE_NAME from user_sequences where 1=1 and SEQUENCE_NAME not like 'SQ_PRICE%'; V_SEQUENCE_NAME VARCHAR2(4000); STRSQL VARCHAR2(4000); nm number(1)...原创 2020-07-23 09:34:53 · 325 阅读 · 0 评论 -
台湾报表sql,月度与年度汇总
select psn.pk_group,psn.pk_psndoc,psn.code,psn.name,psn.glbdef1,bal.thisyearyial,bal.lastal,bal.lastbx,bal.yxhunjia,bal.yxsangjia,bal.yxgongshang,bal.yxchanjia,bal.yxchanjian,bal.yxpeichan,bal.yxshij...原创 2018-04-28 15:04:57 · 376 阅读 · 0 评论 -
pl sql developer查看执行的sql历史记录
登录PL SQL后,按快捷键Ctrl +e ; 就能看到在PLsql中执行过的sql语句列表,有时候遗忘了之前的sql或者电脑重启或故障关机等情况,可以调出未保存的但执行过的历史sql语句。...原创 2018-04-28 14:12:53 · 5897 阅读 · 0 评论 -
查看Oracle数据库执行过的sql
select sql_text,last_load_time from v$sql order by last_load_time desc;SELECT sql_text, last_load_time FROM v$sql WHERE last_load_time IS NOT NULL and sql_text like 'select%' ORDER BY last_load_tim...原创 2018-04-28 14:09:16 · 3492 阅读 · 0 评论 -
NC考勤日报SQL
SELECT tbm_daystat.pk_daystat pk_daystat, tbm_daystat.pk_group pk_group, tbm_daystat.pk_org pk_org, tbm_daystat.pk_psndoc pk_psndoc, ...原创 2018-04-28 14:06:46 · 503 阅读 · 0 评论 -
NC每日休假信息SQL
--每天上下班时间+每天休假情况select v.* ,(select (case when v.if_rest='Y' then 0 else (case when to_date(b.leavebegintime ,'yyyy-mm-dd hh24:mi:ss')<=v.begintime and to_date(b.leaveendtime ,'yyyy-mm-dd...原创 2018-04-28 14:02:46 · 268 阅读 · 0 评论 -
NC部门考勤月报定制sql
SELECT t_1.pk_psndoc pk_psndoc, t_1.pk_group pk_group, t_1.pyear pyear, t_1.month month, t_1.code psncode, t_1.name psnname, t_1.glbdef1 glbdef1, t_1.t...原创 2018-05-03 10:42:20 · 605 阅读 · 0 评论 -
用友NC加班统计表SQL
SELECT t_1.pk_group pk_group, t_1.otyear otyear, t_1.otmonth otmonth, t_1.name psnname, t_1.overtimebegintime overtimebegintime, t_1.overtimeendtime overtimeendtime, ...原创 2018-04-20 17:18:10 · 384 阅读 · 0 评论