开发者

SQL query works fine in TOAD , but not when placed in java code

The following sql query executes fine when ran in TOAD editor and shows results,but does not fail or show results when placed in java code.

CREATE TABLE CDRRD.C31820_ADHOCM AS 
    SELECT A.REC_ID A_REC_ID, A.NORM_DUR A_DUR, A.NORM_STDT A_STDT, A.TOTAL_TYPE A_TT, B.REC_ID B_REC_ID, B.NORM_DUR B_DUR,  B.NORM_STDT B_STDT, 
           B.TOTAL_TYPE B_TT, 2180 SCENARIO_ID,3324 PAIR_ID,1 RECURSIVE_STAGE_ID FROM 
           (SELECT D.* FROM CDRRD.C31820_3445 D WHERE EXISTS (
                      SELECT E.* AS FROM CDRRD.C31820L E WHERE E.A_TT = 473 AND E.开发者_如何学CRECURSIVE_STAGE_ID = 1 AND E.A_REC_ID = D.REC_ID)) A , 
           (SELECT F.* FROM CDRRD.C31820_3440 F WHERE EXISTS (
                      SELECT G.* AS FROM CDRRD.C31820R G WHERE G.B_TT = 300 AND G.RECURSIVE_STAGE_ID = 1 AND G.B_REC_ID = F.REC_ID)) B 
    WHERE EXISTS (SELECT * FROM CDRRD.C31820_ADHOC C WHERE  A.NORM_A = C.NORM_B AND C.NORM_A = B.NORM_A AND B.PAY_TYPE = C.PAY_TYPE AND A.PAY_TYPE = C.PAY_TYPE ) 
     AND TO_NUMBER ((a.norm_stdt - b.norm_stdt) * 86400) BETWEEN -90 AND 90 AND (b.norm_dur - a.norm_dur) BETWEEN -1 AND 2


It's a create statement, what results do you expect?


You should check if you commit the transaction after the command is executed.

it would help to see the java code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜