【发布时间】:2016-12-07 11:12:44
【问题描述】:
我想创建一个临时表。
select * from TFW_ARCHIVETRANSACTION
where TYPE = 'openAccountTransferLifeCycle' and STATUS = 5 and
to_char(substr(
TRANSACTIONDATA,
instr(TRANSACTIONDATA,'<ns:CredentialFunction>') + length('<ns:CredentialFunction>'),
instr(substr(
TRANSACTIONDATA,
instr(TRANSACTIONDATA,'<ns:CredentialFunction>') + length('<ns:CredentialFunction>')
), '</ns:CredentialFunction>') - 1
)) = 'OpenCurrentAccount';
我正在尝试:
with openAccountTransferLifeCycle_c AS (
select * from TFW_ARCHIVETRANSACTION
where TYPE = 'openAccountTransferLifeCycle'and STATUS = 5 and
to_char(substr(
TRANSACTIONDATA,
instr(TRANSACTIONDATA,'<ns:CredentialFunction>') + length('<ns:CredentialFunction>'),
instr(substr(
TRANSACTIONDATA,
instr(TRANSACTIONDATA,'<ns:CredentialFunction>') + length('<ns:CredentialFunction>')
), '</ns:CredentialFunction>') - 1
)) = 'OpenCurrentAccount'
);
但它不起作用。
哪里错了?
【问题讨论】:
-
请同时说明您想要达到的目标。第二个 sn-p 应该创建一个临时表吗?什么告诉你它“不工作”?你有任何类型的错误输出吗?你期望结果是什么样的?它看起来像什么?
标签: sql temp-tables