也就是:Q3.character1,Q3.character3 的值代不出來!!!
請大家幫看一下!
謝謝

解决方案 »

  1.   

    对不起,原贴中没注意写错一个地方--try:select Q1.collection_id,Q1.character1 ,Q1.character3 ,Q2.character1,Q3.character1,Q3.character3 
    from (select collection_id,character1 ,character3 from qa_results where CHARACTER3='拒絕' and RECEIPT_NUM = '304110034') q1,
    (select collection_id,character1 from qa_results where (CHARACTER3 is null or CHARACTER3='') and RECEIPT_NUM = '304110034') q2,
    (select collection_id,character1 ,character3 from qa_results where CHARACTER3 not in ('拒絕','接受','',null and RECEIPT_NUM = '304110034') q3
    where q1.collection_id=q2.collection_id(+) and q1.collection_id=q3.collection_id(+)
      

  2.   

    (select collection_id,character1 from qa_results where (CHARACTER3 is null or CHARACTER3='') and RECEIPT_NUM = '304110034') q2,
    这个结果集中条件应该是
    where (... or ...) and ...而原来那句写成了 where ... or ... and ...
      

  3.   

    select Q1.collection_id,Q1.character1 ,Q1.character3 ,Q2.character1,Q3.character1,Q3.character3 
    from (select collection_id,character1 ,character3 from qa_results where CHARACTER3='拒絕' and RECEIPT_NUM = '304110034') q1,
    (select collection_id,character1 from qa_results where (CHARACTER3 is null or CHARACTER3='') and RECEIPT_NUM = '304110034') q2,
    (select collection_id,character1 ,character3 from qa_results where CHARACTER3 not in ('拒絕','接受','',null) and RECEIPT_NUM = '304110034') q3
    where q1.collection_id=q2.collection_id(+) and q1.collection_id=q3.collection_id(+)這樣後一Q2.character1,Q3.character1,Q3.character3 的值都沒有了???
      

  4.   

    select Q1.collection_id,Q1.character1 ,Q1.character3 ,Q2.character1,Q3.character1,Q3.character3
    from (select collection_id,character1 ,character3 from qa_results where CHARACTER3='拒絕' and RECEIPT_NUM = '304110034') q1,
    (select collection_id,character1 from qa_results where (CHARACTER3 is null or CHARACTER3='') and RECEIPT_NUM = '304110034') q2,
    (select collection_id,character1 ,character3 from qa_results where (character3 !='拒絕' and length(character3)>0 and character3 !='接受') and RECEIPT_NUM = '304110034') q3
    where q1.collection_id=q2.collection_id(+) and q1.collection_id=q3.collection_id(+) 
    union select collection_id,character1 ,character3,null,null,null from qa_results where CHARACTER3='接受';
      

  5.   

    --retry:select Q1.collection_id,Q1.character1 ,Q1.character3 ,Q2.character1,Q3.character1,Q3.character3
    from (select collection_id,character1 ,character3 from qa_results where CHARACTER3='拒絕' and RECEIPT_NUM = '304110034') q1,
    (select collection_id,character1 from qa_results where (CHARACTER3 is null or CHARACTER3='') and RECEIPT_NUM = '304110034') q2,
    (select collection_id,character1 ,character3 from qa_results where (character3 !='拒絕' and length(character3)>0 and character3 !='接受') and RECEIPT_NUM = '304110034') q3
    where q1.collection_id=q2.collection_id(+) and q1.collection_id=q3.collection_id(+) 
    union select collection_id,character1 ,character3,null,null,null from qa_results where CHARACTER3='接受' and RECEIPT_NUM = '304110034';