on 09-01-2011 4:46 PM
Bom dia!
Como consigo identificar o relacionamento entre NFs que foram devolvidos por SQL?
Ou seja, existe algum campo que me indica que a NF Saida '123' foi devolvida?
Abraço a todos.
Caro Valter,
Abaixo, segue um simples SELECT que traz todas as Notas, menos as que foram devolvidas. Talvez esse relacionamento possa ajudá-lo:
SELECT * FROM OINV
WHERE
OINV.DocEntry NOT IN(SELECT RIN1.[BaseEntry]
FROM ORIN INNER JOIN RIN1 ON ORIN.DocEntry = RIN1.DocEntry
WHERE RIN1.[BaseEntry] IS NOT NULL)
Att,
Marco.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.