1 2 3 4 5 6 7
| SELECT ACC.NUHOAC, NCH06.CMN_COP_NCPOPO, ACC.CCAMAC
FROM HOS
JOIN ACC ON ACC.NUHOAC = HOS.NUHOHO
JOIN NCH06 ON NCH06.NCCLI_NUMECLI = HOS.NUMAHO
WHERE ACC.CCAMAC IN ('LAQK003','LAQK005','LBQK005','LCQK002','LDQK001','LDQK002','LDQK004','LDQK005','LEQK001','LEQK002','LFQK001','LFQK002','LGQK001','LHQK007','LJQK001','LJQK002','LJQK015','MAQK001','MAQK002','MAQK003','MBQK001','MCQK001','MDQK001','MFQK001','MFQK002','MGQK001','MGQK002','MGQK003','MZQK003','MZQK004 ','NAQK002','NAQK007','NAQK015','NAQK023','NBQK001','NCQK001','NDQK001','NDQK002','NDQK003','NEQK010','NEQK012','NEQK035','NFQK001','NFQK002','NFQK003','NFQK004','NGQK001','NGQK002','NZQK005','NZQK006','PAQK001','PAQK003','ZBQK002','ZCQK002')
AND xxx.DAEXAC > '01012012'
AND xxx.DAEXAC < '01012013'; |