0
I am trying to perform a query to the Informix Database, and it is bringing the data in normally, but it is ignoring the search criteria.
SELECT cnnfcapa.id_nfcapa,
cnnfcapa.filial, cnnfitem.tpordem,
cnnfcapa.ordemserv, cnnfcapa.dtnota,
cnnfcapa.cgccpf,
cnnfcapa.tppessoa, cnnfcapa.transacao,
cttransa.mvtotransacao,
cttransa.tipotransacao,
cnnfcapa.id_agente,
cnnfcapa.id_agentvext,
cnnfitem.descritem, cnnfitem.mercadoria,
cnnfitem.quantidade,
cnnfitem.valoritem
FROM cnnfcapa
INNER JOIN cnnfitem ON
cnnfcapa.id_nfcapa = cnnfitem.id_nfcapa
INNER JOIN cttransa ON
cnnfcapa.transacao = cttransa.transacao
WHERE dtnota BETWEEN "01/01/2015"
AND "31/12/2015"
AND cttransa.mvtotransacao="S"
AND cttransa.tipotransacao=10
OR cttransa.tipotransacao=15
OR cttransa.tipotransacao=30
OR cttransa.tipotransacao=35
The result is like this:
Another thing: I don’t know the details of Informix, but check the documentation to see if you can even use this date format. It would be safer
AAAA-MM-DD
.– bfavaretto
It’s a third-party database. I’m only importing this data into my Mysql database. Thanks for the tip
– Webster Moitinho