随笔分类 -  Oracle

摘要:LEFT JOIN (SELECT * FROM (SELECT B.BILL_CODE, B.ACK_CODE, ROW_NUMBER() OVER(PARTITION BY B.ACK_CODE ORDER BY B.BILL_CODE) R FROM TAB_BILL_JHD_ACKREL B 阅读全文
posted @ 2018-10-11 11:09 Debugs 阅读(223) 评论(0) 推荐(0)
摘要:create or replace trigger T_TEST after insert or delete on TEST for each row declare -- local variables here A NUMBER; PRAGMA AUTONOMOUS_TRANSACTION; 阅读全文
posted @ 2018-08-09 12:04 Debugs 阅读(451) 评论(0) 推荐(0)
摘要:select regexp_substr(p.attributename, '[^,]+',1,level) c1from tablename p connect by level <= length(p.attributename) - length(replace(p.attributename 阅读全文
posted @ 2018-06-28 15:59 Debugs 阅读(7891) 评论(0) 推荐(0)
摘要:create or replace trigger trg_tab_sorting_theme_change before insert or update of PACKAGE_TYPE or delete on TAB_SORTING_THEME for each rowdeclare -- l 阅读全文
posted @ 2018-06-25 19:31 Debugs 阅读(261) 评论(0) 推荐(0)
摘要:CREATE OR REPLACE TRIGGER trg_quote_otherArea_to_list before insert or delete or update of modify_date on tab_quote_other_area for each rowdeclare int 阅读全文
posted @ 2018-05-24 09:38 Debugs 阅读(138) 评论(0) 推荐(0)
摘要:case when里的like功能 假如要用到case when又要用到like这样的功能,即如果字符串包含‘语文’就怎么怎么样,包含‘数学’就怎么怎么样,包含‘英语’就怎么怎么样,like是用于where中的,放在case when里面是无效的,可以用instr()这个函数来查找这些字符出现的位置 阅读全文
posted @ 2018-05-07 10:48 Debugs 阅读(3961) 评论(0) 推荐(0)
摘要:with temp as(select FILE_PATH as text from TAB_CONTRACT)select substr(text,instr(text,',',1,rn)+1,instr(text,',',1,rn+1)-instr(text,',',1,rn)-1) text 阅读全文
posted @ 2018-04-23 13:46 Debugs 阅读(563) 评论(0) 推荐(0)
摘要:CREATE OR REPLACE TRIGGER TAB_AMERCE_balance_new before insert or delete or update of BL_AUDITED ON TAB_AMERCE for each rowdeclare -- local variables 阅读全文
posted @ 2018-04-11 18:55 Debugs 阅读(4668) 评论(0) 推荐(0)
摘要:CREATE OR REPLACE TRIGGER trg_base_authority_insert before insert ON T_BASE_AUTHORITY for each rowdeclare integrity_error exception; errno integer; er 阅读全文
posted @ 2018-04-11 18:37 Debugs 阅读(646) 评论(0) 推荐(0)
摘要:select T.BILL_CODE,t.SCAN_TYPE,t.PIECE,SCAN_SITE,SCAN_MAN, row_number() over(partition by t.bill_code order by t.scan_date desc) AS R from tab_scan_se 阅读全文
posted @ 2018-04-03 09:01 Debugs 阅读(2136) 评论(0) 推荐(0)
摘要:select owner,object_name,object_type,status from dba_objects where object_name = 'LT_EXPORT_PKG';如果有失效对象在SQLPLUS中执行SQL> @?/rdbms/admin/utlrp 重新编译一下再试试看如果还是不行, 最终解决方案,重建该对象:SQL> @?/rdbms/admin/owmins... 阅读全文
posted @ 2018-03-02 13:10 Debugs 阅读(727) 评论(0) 推荐(0)
摘要:public class TestIO { public static void main(String[] args) { File inputFile = new File("a.txt");//这个地方要考虑到a.txt和b.txt在项目中的位置 File outputFile = new F 阅读全文
posted @ 2018-02-05 10:38 Debugs 阅读(438) 评论(0) 推荐(0)
摘要:File dir=new File("\\root"); File f1=new File(dir,"fileOne.txt"); File f2=new File(dir,"fileTwo.java"); if(!dir.exists()) dir.mkdir(); if (!f1.exists( 阅读全文
posted @ 2018-02-01 17:07 Debugs 阅读(118) 评论(0) 推荐(0)
摘要:/************************************************************************ ********* Oracle最大游标数控制 ******* ******************************************** 阅读全文
posted @ 2018-01-31 13:30 Debugs 阅读(387) 评论(0) 推荐(0)
摘要:@echo off echo echo Windows环境下Oracle数据库的自动备份脚本 echo 1. 使用当前日期命名备份文件。 echo 2. 自动删除之前的备份。 echo set curdate=%date:~0,4%%date:~5,2%%date:~8,2% set backupp 阅读全文
posted @ 2018-01-31 10:42 Debugs 阅读(3038) 评论(0) 推荐(0)
摘要:-- Create the user create user lesdba identified by les_321 default tablespace USERS temporary tablespace TEMP profile DEFAULT password expire;-- Gran 阅读全文
posted @ 2017-11-10 19:37 Debugs 阅读(265) 评论(0) 推荐(0)
摘要:float qty=22; float mult_iss=5; float slt = (float) (qty - ( Math.floor(qty / mult_iss)* mult_iss)) ; for(int j = 0; j < Math.floor(qty / mult_iss); j 阅读全文
posted @ 2017-09-01 14:16 Debugs 阅读(182) 评论(0) 推荐(0)
摘要:oracle的递归运算(树运算)start with org_id ='1'connect by prior parent_id=son_id 1.前言 oracle的递归运算,在我们web页面的目录结构中会经常用到,据说是面试经常出的题目,而网上的一些东西说得都不是很明了,所以自己整理了一下,以下 阅读全文
posted @ 2017-08-22 12:40 Debugs 阅读(1375) 评论(0) 推荐(0)
摘要:通过子节点向根节点追朔. select * from persons.dept start with deptid=76 connect by prior paredeptid=deptid 通过根节点遍历子节点(不包含根节点). select * from persons.dept start w 阅读全文
posted @ 2017-08-22 12:27 Debugs 阅读(2244) 评论(0) 推荐(0)
摘要:排除本身 <select id="getdata" parameterClass="map" resultClass="hmap"> SELECT TO_CHAR(XRGFN_START,'yyyy-mm-dd') XRGFN_START, TO_CHAR(XRGFN_EXPIRE,'yyyy-mm 阅读全文
posted @ 2017-08-15 10:49 Debugs 阅读(296) 评论(0) 推荐(0)