-2
我想创建一个临时表。WITH子句 - 临时表创建
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'
);
,但它无法正常工作。
哪里出错?
请使用更好的标签为您的问题。你根本不应该使用[tag:table]标签(它在描述中是这样说的),[tag:temporary]也不代表任何意思。如果你的问题是关于MySQL或类似的话,请使用[tag:mysql]之类的东西;否则我们不知道你在说什么。 – deceze
请同时说明你正在努力达到的目标。第二个片段是否应该创建一个临时表?什么告诉你它是“不工作”?你有任何一种错误输出?你期望结果是什么样的?它看起来像什么? – Julian