select * from table_name
where BaseDocEntry=15 and BaseDocType='PRRH' and ItemCode='TestStudy2'
and WhseCode='01' and (currentdoctype<>'PUSH' and CurrentDocEntry<>15)
上記のクエリによると、INS2 からのデータは、currentdoctype [PUSH] と CurrentDocEntry が 15 ではないすべてのデータを除いてフェッチされます。 currentdoctype=PUSH と CurrentDocEntry=15 が同じ行で発生している場合、その行を除外します。
このクエリを修正できますか?