我查询如下语句,发现有报错,具体见:
SQL> select '0|20604|'||out_file_name||'|'||FILE_COUNTS||'|'||NUM_01||'|'||DURATIONS||'|'||SETT_FEES||'|'||START_DATETIME
2 from test
3 wheremodel_code=32and log_type=42 and out_file_name like '%SettlementSta%'
4 and substr(START_DATETIME,1,8) =to_char(sysdate-1,'yyyymmdd');
select '0|20604|'||out_file_name||'|'||FILE_COUNTS||'|'||NUM_01||'|'||DURATIONS||'|'||SETT_FEES||'|'||START_DATETIME
from test
wheremodel_code=32and log_type=42 and out_file_name like '%SettlementSta%'
and substr(START_DATETIME,1,8) =to_char(sysdate-1,'yyyymmdd')
ORA-12801: error signaled in parallel query server P003
ORA-01722: invalid number
发现model_code的类型为varchar型,并且tg_log 表为nologging, 并且该表有并行度,degree=4
发现奇怪的是,将32改为'32'后,也不报parallel的错误了。
SQL>
SQL> select '0|20604|'||out_file_name||'|'||FILE_COUNTS||'|'||NUM_01||'|'||DURATIONS||'|'||SETT_FEES||'|'||START_DATETIME
2from test
3 wheremodel_code='32'and log_type=42 and out_file_name like '%SettlementSta%'
4 and substr(START_DATETIME,1,8) =to_char(sysdate-1,'yyyymmdd');
'0|20604|'||OUT_FILE_NAME||'|'
--------------------------------------------------------------------------------
0|20604|SettlementSta.20090212.0001.951||1130950|114613471|53125.14|200902120030
0|20604|SettlementSta.20090212.0002.951||1716347|168510691|59825.08|200902121230
接着把test表的并行度和nologging都去掉,发现32不要改为'32'也能查出记录了,不报错了,这是为什么呢?
SQL> alter table test logging;
Table altered
SQL> alter table test noparallel;
Table altered
SQL>
SQL>
SQL> select '0|20604|'||out_file_name||'|'||FILE_COUNTS||'|'||NUM_01||'|'||DURATIONS||'|'||SETT_FEES||'|'||START_DATETIME
2from test
3 wheremodel_code=32and log_type=42 and out_file_name like '%SettlementSta%'
4 and substr(START_DATETIME,1,8) =to_char(sysdate-1,'yyyymmdd');
'0|20604|'||OUT_FILE_NAME||'|'
--------------------------------------------------------------------------------
0|20604|SettlementSta.20090212.0001.951||1130950|114613471|53125.14|200902120030
0|20604|SettlementSta.20090212.0002.951||1716347|168510691|59825.08|200902121230
[ 本帖最后由 wabjtam123 于 2009-2-13 16:08 编辑 ]
|