Syntax error in Informix database query

Asked

Viewed 66 times

0

I made a prototype of a database informix in the Access to optimize the construction of my queries. I use with the Mysql and through some adaptations in the syntax I get a good.

But in the informixI’m not getting it. I want to believe it’s a small detail but I’m not finding.

The relationships between the tables are the ones I set up on Access:

Query do Access

The consultation of the bank informix I did it this way:

SELECT cnnfcapa.tpordem, cnnfcapa.id_agente, cnnfcapa.id_agentvext,
cmgrupos.id_grupos, cnnfitem.desritem, cnnfitem.mercadoria,
cnnfitem.quantidade, cnnfitem.valoritem, 0 AS rsrv,
(cnnfitem.valoritem-cnnfitem.customedio`) AS lprd
FROM cmgrupos
INNER JOIN cscapas
INNER JOIN cnnfcapa
INNER JOIN cnnfitem ON cnnfcapa.id_nfcapa = cnnfitem.id_nfcapa
AND cscapas.ordemserv = cnnfcapa.ordemserv
INNER JOIN cttransa ON cnnfcapa.transacao = cttransa.transacao
AND cmgrupos.id_grupos = cnnfitem.idgrupos
INNER JOIN cipessoa
INNER JOIN ciendere ON cipessoa.cgccpf = ciendere.cgccpf
AND cnnfcapa.nro_proprietario = ciendere.nro_endere
WHERE cnnfitem.tpitem "<>2"
AND cttransa.mvtotransacao Like "S"
AND cttransa.tipotransacao Like 10

I wonder where I’m going wrong?

  • what do you mean "I’m not getting it"? query returns wrong? returns some error? which??

  • Returns syntax error

  • You can put the error message?

  • "201: A syntax error has occurred"

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.