`
qingyujingyu427
  • 浏览: 26980 次
社区版块
存档分类
最新评论
文章列表
disable script:   DECLARE BEGIN FOR i IN (SELECT table_name, constraint_name --disable first the foreign key FROM user_constraints WHERE constraint_type ='R' AND status = 'ENABLED' ) LOOP EXECUTE IMMEDIATE 'alter table "' ||i.table_name|| '&quo ...
Replace Examples:  Date format change from dd.mm.yyyy to yyyy-mm-dd. This will turn the European date style 26.8.1994 or 26/8/1994 into 1994-8-26.   Search: ([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})   Replace: $3-$2-$1   Find Examples:  (.)\1+         matches 'aaaa' and 'cc'.   ...
USE [database name] EXEC sp_MSforeachtable @command1="ALTER TABLE ? DISABLE TRIGGER ALL" GO EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL" GO Reference: http://www.sqlusa.com/bestpractices2005/disabletriggerconstraint/
DB2 is so hard to use, also its documentation... Even such a simple operation, it takes me much time...   Generally, char->varchar, smallint->integer, you can just modify the column through this sql: alter table [table name] alter column [column name] set data type [new type]   But, if new colu ...

db2 snapshot

    博客分类:
  • db2
1. open cmd2. execute command "db2cmd"3. set trace on:    db2 update monitor switches using statement on4. get snapshot:    db2 get snapshot for dynamic sql on "database name" >> "d:\sql.txt"5. set trace off:    db2 update monitor switches using statement off
Decorator, don't alter interface, but add resposibility. Adapter, convert one interface to another. Facade, make interface simpler.
比如做一个wiki需要用的rich text editor,拿confluence和FCEditor为样本,需要有的基本功能: undo redo find replace Insert table (Insert row, Delete row, Insert column, Delete column) Insert unordered list Insert ordered list Bold text Italic text Underline text StrikeThrough text Paragraph format Outdent Indent Insert link Ins ...
Specified that implementations running in a JSR-250 compliant container have their managed bean methods annotated with @PostConstruct be called after the object is instantiated, and after injection is performed, but before the bean is placed into scope. Specified that methods annotated with @PreDestr ...
Problem description can be found here. A. Alien Numbers Follow is the solution: public String getTargetNumber(String alienNumber,String srcLang,String targetLang) { String ret = ""; // convert alienNumber to decimal number first int decimalNumber = 0; ...
CorporationSalary You can find the problem description here. Because the problem is little simple, so here change "If an employee has any subordinates, then his salary is equal to the sum of the salaries of his direct subordinates." as "If an employee has any subordinates, then his sal ...

list sort

Usage: list.sort([cmp[,key[,reverse]]]) how to use cmp parameter def my_cmp(x,y): if x<y: return -1 elif x==y: return 0 else: return 1 arr = [2,5,3,1,4] arr.sort(my_cmp) print arr     Above example's result is [1,2,3,4,5]; how to use key parameter arr = ['bj:beiji ...
全本的:裸兰善良的死神大唐行镖随波逐流之一代军师不死不灭佣兵天下正在更新的: 紫川 庆余年 师士传说异人傲世录神墓赫氏门徒
如果有一个TYPE: CREATE OR REPLACE type EMP_TYPE AS object ( id NUMBER , name VARCHAR2 , birthday DATE , sex CHAR (1) ); 有一个Pacakge: CREATE OR REPLACE PACKAGE EMP_UTIL IS FUNCTION get_emp_by_id (p_id NUMBER) RETURN EMP_TYPE; PROCEDURE create_emp (p_emp EM ...
oracle text的索引跟其它的基本索引不同,当执行dml操作时,数据库不会自动维护这些索引(不过会将这些dml操作记录在表CTX_USER_PENDING里),需要调用存储过程ctx_dll.sync_index来维护索引。 当执行ctx_dll.sync_index时,会先去CTX_USER_PENDING表里查看未索引的行,然后将其索引。ctx_dll.sync_index能够利用多cpu的优势,并行执行。 Index Fragmentation The CONTEXT index is an inverted index where each word contains the ...
第一步需要先建一个oracle directory。 create directory TEMP_DIR as '/home/oracle/temp'; declare   xml_str            clob;  xml_file           Utl_File.file_type;  offset             NUMBER              := 1;  buffer             varchar2(4000);  buffer_size        number              := 2000;begin  xml_file ...
Global site tag (gtag.js) - Google Analytics