Hi, I am trying to execute the following query in DB2 command editor,
db2 SELECT B.ACCTNO,B.BNO, B.STATUS, B.ASTATUS, B.VALIDFROM, B.VALIDTO FROM DEB.ACCOUNT B WHERE B.ACCTNO IN (SELECT A.ACCTNO FROM DEB.ACCOUNT A WHERE A.VALIDTO IS NULL AND A.STATUS='0' AND A.ASTATUS='0' GROUP BY A.ACCTNO HAVING COUNT(*) > 1) >> out.txt
and the following error is printed in the out.txt;
SQL0104N An unexpected token "<END-OF-STATEMENT>" was found following "". Expected tokens may include: "< > = <> <= !< !> != ^< ^> ^= >= IN NOT". SQLSTATE=42601
Please help me