SELECT NOTAFISC.NUM_NF,NOTAFISC.DT_EMIS,NOTAFISC.DT_QUITACAO,NOTAFISC.STATUS,NOTAFISC.VLR_NF,NOTAFISC.VLR_TX_ADM,CADPROP.COD_PROP,CADPROP.NOME,CADPROP.ENDERECO_RES,CADPROP.BAIRRO_RES,CADPROP.CIDADE_RES,CADPROP.UF_RES,CADPROP.FONE_RES,CADPROP.CEP_RES,CADPROP.CNPJ_CPF,CADIMOV.COD_IMOV,CADIMOV.ENDERECO,CADINQU.NOME,RIMOPROP.PROP_PRINCIPAL
FROM NOTAFISC,CADIMOV,CADINQU,CTRLOCA,RIMOPROP,CADPROP
WHERE CTRLOCA.COD_IMOV=CADIMOV.COD_IMOV
AND CTRLOCA.COD_INQU=CADINQU.COD_INQU
AND NOTAFISC.COD_LOC=CTRLOCA.COD_LOC
AND RIMOPROP.COD_IMOV=CADIMOV.COD_IMOV
AND RIMOPROP.COD_PROP=CADPROP.COD_PROP
AND ( NOTAFISC.DT_QUITACAO>= '05/01/2006' And NOTAFISC.DT_QUITACAO<= '05/31/2006')
AND ( NOTAFISC.STATUS= 'Q')
AND ( RIMOPROP.PROP_PRINCIPAL= 'S')
ORDER BY 7
