sqlldr语法 (转贴)
sqlldr语法March 20th, 2007 | Categories: Boring | Tags: Leave a comment | Trackback 在北信的时候学习sqlloader的笔记,留着查询用。现在基本忘记上大学的日子了。控制根据数据不同插入不同的表(条件装载); FIELDS TERMINATED BY x’09′ (制表符)whitespace(空格)等不同的数据分隔符号 装载定长数据; 装载变长数据; 装载嵌套数据; 在sqlldr中使用函数 如何装载日期类型纪录 装载分区表; TRAILING NULLCOLS 使用filler 跳过 在导入数据文本中不想进行导入的列 控制根据数据不同插入不同的表包括文件:日志文件;控制文件;坏记录文
转人家的贴 关于SQLLOADER
sqlldr语法<DIV class=meta.March 20th, 2007 | Categories: Boring | Tags: Leave a comment | Trackback 在北信的时候学习sqlloader的笔记,留着查询用。现在基本忘记上大学的日子了。控制根据数据不同插...
show you BULK_EXCEPTIONS
see below[@more@]declare /* relies on... create table t ( text varchar2(3) ) */type words_t is table of varchar2(10);words words_t :=words_t ( 'dog', 'fish', 'cat', 'ball', 'bat', 'spoke', 'pad' )/* 'ball' and 'spoke' will raise ORA-01401 */;n integer := 0;type error_indexes_t is table of integer index by binary_integer;error_indexes error_indexes_t;type error_codes_t is table of varchar2(255) index by binary_integer;error_codes error_codes_t;type error_context_t is table of varchar2(255) index
print oracle error msg list
convenient for who views all error msg [@more@] create table SQLERRTAB( SQLNO VARCHAR2(10), SQLERRTEXT VARCHAR2(4000)) DECLAREerr_msg VARCHAR2(1200);BEGIN--dbms_output.enable (1000000);FOR err_num IN 0.. 100000LOOP err_msg := SQLERRM (-err_num);IF err_msg NOT LIKE '%Message '||err_num||' not found%' AND err_msg NOT LIKE '% non-ORACLE exception %' THENinsert into SQLERRTAB VALUES ('ORA-'||LPAD(ERR_NUM,5,'0'),ERR_MSG); END IF;END LOOP;END;
init parameter
init parameter [@more@]The O7_DICTIONARY_ACCESSIBILITY initialization parameter controls restrictions on system privileges when you upgrade from Oracle7 to Oracle8i and higher releases. If the parameter is set to TRUE, access to objects in the SYS schema is allowed (Oracle7 behavior). If this parameter is set to FALSE, system privileges that allow access to objects in "any schema" do not allow access to objects in SYS schema. The default for O7_DICTIONARY_ACCESSIBILITY is FALSE. When t
export custom table data into any file on your operation system
/* check input datatpye*/ CREATE OR REPLACE FUNCTION ifnum(P_NUM IN VARCHAR2) RETURN VARCHAR2 AS V_TMP NUMBER; BEGIN IF P_NUM IS NULL THEN RETURN NULL; END IF; V_TMP := TO_NUMBER(P_NUM); RETURN 'T'; EXCEPTION WHEN OTHERS THEN RETURN 'N'; END;/**************************************************//* setting your utl_file_dir /alter system set utl_file_dir='/your DIR' scope=spfile; create or replace function output_data( p_query in varchar2,
multiplication table output on sqlplus
[@more@]declarea integer := 1;b integer := 1;c integer := 0;string varchar(1000) := null ;string1 varchar(1000) := null ;beginfor a in 1..9 loopfor b in 1..9 loopif b <= a thenc := a * b;string := to_char( b ||'*'|| a|| '='||c ||' ');select concat(string1,string) into string1 from dual ;end if; end loop; dbms_output.put_line( string1 );string := null; string1 := null;end loop; end;**************************************************create table LRH_CONBY( EMPLOYEES_ID VARCHAR2(4), EMPLOYEES
about bbed usage , quote from others
今天学习了bbed工具的初步使用方法,以下是备忘:bbed就是英文block browse block edit的缩写,用来直接查看和修改数据文件数据的一个工具。今天学习了bbed工具的初步使用方法,以下是备忘:bbed就是英文block browse block edit的缩写,用来直接查看和修改数据文件数据的一个工具。在windows上没有提供这个工具,在linux上面有,需要编译:make -f ins_rdbms.mk BBED=$ORACLE_HOME/rdbms/lib/bbed $ORACLE_HOME/bin/bbed然后把$ORACLE_HOME/rdbms/lib加到环境变量的PATH里面,就可以直接在命令中bbed了。编译好了就可以使用了,不过有个默
often access url collections
-------------------------->>> http://www.csee.umbc.edu/help/oracle/index.shtml http://www.psoug.org/reference/system_privs.html http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96521/toc.htm http://www.torontofirstradio.com/default.html http://www.adp-gmbh.ch/ora/concepts/transaction.html[@more@]