想要以Teradata格式更改Oracle代码

时间:2014-12-07 06:38:23

标签: sql teradata

以下是我想要转换为Teradata的Oracle SQL查询。

with Temp As
    (
    select
    A,
    B,
    C
from table1
    UNION
    select
    D,
    E,
    F
from table2
    )
    select * from temp where A<>'XXX'
    UNION
    select * from temp t1 where A='XXX'
    and NOT EXISTS(select 1 from temp t2 where t1.b=t2.b and t1.c=t2.c and t2.A='YYY')

0 个答案:

没有答案