如何在SQL中組合OR &?在下面的查詢,我所需要的條件語句daction是「拒絕」的所有值或daction是「批准」有「APPROVALTYPE」爲NOT NULL值在Oracle中組合或者&SQL
下面是我的查詢:
SELECT WorkflowHistory.*,
Reason.Reason,
ApprovalType.ApprovalType
FROM WorkflowHistory WorkflowHistory,
Reason Reason,
ApprovalType ApprovalType
WHERE UPPER(dDocName) = UPPER('D_1188259')
AND xDocApproval = ApprovalType.ApprovalTypeID(+)
AND daction like 'Reject'
OR (daction ='Approve'
AND APPROVALTYPE IS NOT NULL);
請幫幫我。