ora-30004:when using sys_connect_by_path function,cannot have seperator as part of column value
今天在做線上重定義表對一個8000w行的大表進行分割槽之前拼寫指令碼的時候報了一個錯 ora-30004
EXEC DBMS_REDEFINITION.START_REDEF_TABLE(USER, 'TESTTT1', 'TESTTT1_PART', 'OWNER OWNER ,OBJECT_NAME OBJECT_NAME ,SUBOBJECT_NAME SUBOBJECT_NAME ,OBJECT_ID OBJECT_ID ,DATA_OBJECT_ID DATA_OBJECT_ID ,OBJECT_TYPE OBJECT_TYPE ,CREATED CREATED ,LAST_DDL_TIME LAST_DDL_TIME ,TIMESTAMP TIMESTAMP ,STATUS STATUS ,TEMPORARY TEMPORARY ,GENERATED GENERATED ,SECONDARY SECONDARY ', DBMS_REDEFINITION.cons_use_rowid);
用下面的sql取上面的column mapping
select name
from (select substr(sys_connect_by_path(a, ','), 2) name
from (select a,
rnFirst,
lead(rnFirst) over(order by rnFirst) rnNext
from (select a.a, row_number() over(order by a.b) rnFirst
from (select '1' b,
column_name || ' ' || column_name || '' a
from user_tab_columns
where table_name = '&TABLE_NAME') a) tmpTable1) tmpTable2
start with rnNext is null
connect by rnNext = prior rnFirst
order by 1 desc)
where rownum = 1
ora-30004:when using sys_connect_by_path function,cannot have seperator as part of column value
上面的錯誤很明顯,就是提示分隔符不能出現在欄位的內容中
也對哦,如果欄位中含有分隔符字元,就不能和真正的分隔符進行區分了,你也可以換個分隔符試試看,應該就不報錯了
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70612/viewspace-1049473/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- React報錯之Function components cannot have string refsReactFunction
- ORA-28348, encryption column TDE, function indexFunctionIndex
- cannot access local variable where it is not associated with a value
- Warning: Cannot redeclare function_name()Function
- use the function_based index to access the null valueFunctionIndexNull
- Using the Template Collection to Add a Template Column in WebDataGridWeb
- Unable to View Chinese Font When Using Tools>Copy FileView
- C# return dynamic/anonymous type value as function resultC#Function
- duplicate ORA-01405: fetched column value is NULLNull
- Login Oracle Instance Even When sysdba Cannot Do SoOracle
- [20230303]sqlplus column new_value old_value.txtSQL
- mysql 主從同步 Error 'Out of range value for column的問題MySql主從同步Error
- Why Is My Query Using a High Value for Degree of ParallelismParallel
- [20231103]sqlplus column new_value old_value.txtSQL
- GET ORA-32700 WHEN TRYING TO CREATE DATABASE USING 9.2Database
- ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default valueError
- C++ Programming Error/Warning Analysis (1) cannot have cv-qualifierC++Error
- Multi-table insert using pipelined functionFunction
- 去除UITableView多餘的seperatorUIView
- 修改ListView 分割線Seperator lineView
- 翻譯 | Learning React Without Using React Part 2React
- 翻譯 | Learning React Without Using React Part 1React
- Recreate stdby Control File When dbf Are On ASM And Using OMF-734862.1ASM
- 資料庫報錯java.sql.SQLException: Field ‘id‘ doesn‘t have a default value資料庫JavaSQLException
- 452 Error writing file: A file cannot be larger than the value set by ulimit.ErrorMIT
- 異常:java.sql.SQLIntegrityConstraintViolationException: Column 'category' cannot be nullJavaSQLAIExceptionGoNull
- ORA-19550: cannot use backup/restore functions while using dispatcherRESTFunctionWhile
- Taking Systemstate Dumps when You cannot Connect to Oracle [ID 121779.1]Oracle
- [MetalKit]23-Using-MetalKit-part-16使用MetalKit16
- [MetalKit]22-Using-MetalKit-part-15使用MetalKit15
- [MetalKit]20-Using-MetalKit-part-14使用MetalKit14
- [MetalKit]19-Using-MetalKit-part-13使用MetalKit13
- [MetalKit]18-Using-MetalKit-part-12使用MetalKit12
- [MetalKit]27-Using-MetalKit-part-17使用MetalKit17
- [MetalKit]17-Using-MetalKit-part-11使用MetalKit11
- [MetalKit]16-Using-MetalKit-part-10使用MetalKit10
- [MetalKit]15-Using-MetalKit-part-9使用MetalKit9
- [MetalKit]9-Using-MetalKit-part-8使用MetalKit8