Subject RES: [firebird-support] It works on FB 2.5 but does not work in FB 1.5
Author Israel Pinheiro

Error Message is:

 

Invalid Token. Dynamic SQL Error code = -104. Invalid Command. Data Type unknown

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Enviada em: quinta-feira, 23 de junho de 2016 17:00
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] It works on FB 2.5 but does not work in FB 1.5

 

 

Hi,

 

error message?

 

regards,

Karol Bieniaszewski

 

Sent: Thursday, June 23, 2016 6:39 PM

Subject: [firebird-support] It works on FB 2.5 but does not work in FB 1.5

 

 



I created a view that works perfectly on FB 2.5, but now need to create the
same view on FB 1.5, but appears error in creation. Can help me?

CREATE OR ALTER VIEW ESPELHO(

DTMOVPROD,

TIPOMOV,

CODNAT,

CODVENDA,

CODCOMPRA,

CODPROD,

DESCPROD,

CODFISC,

TIPOMOVPROD,

DOCMOVPROD,

CODALMOX,

CODLOTE,

QTDMOVPROD,

PRECOMOVPROD,

ESTOQMOVPROD,

SLDMOVPRODAX,

TIPOPROD,

CUSTOMPMMOVPRODAX,

SLDMOVPROD,

CUSTOMPMMOVPROD,

CODMOVPROD,

CODEMPTM,

CODEMP,

CODFILIALTM,

CODFILIAL,

SALDO,

NOME)

AS

SELECT

MP.DTMOVPROD,

TM.TIPOMOV,

MP.CODNAT,

MP.CODVENDA,

MP.CODCOMPRA,

MP.CODPROD,

eq.descprod,

eq.codfisc,

MP.TIPOMOVPROD,

MP.DOCMOVPROD,

MP.CODALMOX,

MP.CODLOTE,

MP.QTDMOVPROD,

MP.PRECOMOVPROD,

MP.ESTOQMOVPROD,

MP.SLDMOVPRODAX,

EQ.TIPOPROD,

MP.CUSTOMPMMOVPRODAX,

MP.SLDMOVPROD,

MP.CUSTOMPMMOVPROD,

MP.CODMOVPROD,

MP.CODEMPTM,

TM.CODEMP,

MP.CODFILIALTM,

TM.CODFILIAL,

(MP.sldmovprod*MP.CUSTOMPMMOVPROD) SALDO,

CLI.NOMECLI

CODTIPOMOV

FROM EQMOVPROD MP, EQTIPOMOV TM

INNER JOIN EQPRODUTO eq on mp.codprod = eq.codprod

inner join vdvenda vd on mp.codvenda=vd.codvenda

inner join vdcliente cli on vd.codcli = cli.codcli

where MP.CODEMPTM=TM.CODEMP AND MP.CODFILIALTM=TM.CODFILIAL AND

MP.CODTIPOMOV=TM.CODTIPOMOV AND tipoprod='P' and mp.codcompra is null

union all

SELECT MP.DTMOVPROD,

TM.TIPOMOV,

MP.CODNAT,

MP.CODVENDA,

MP.CODCOMPRA,

MP.CODPROD,

eq.descprod,

eq.codfisc,

MP.TIPOMOVPROD,

MP.DOCMOVPROD,

MP.CODALMOX,

MP.CODLOTE,

MP.QTDMOVPROD,

MP.PRECOMOVPROD,

MP.ESTOQMOVPROD,

MP.SLDMOVPRODAX,

EQ.TIPOPROD,

MP.CUSTOMPMMOVPRODAX,

MP.SLDMOVPROD,

MP.CUSTOMPMMOVPROD,

MP.CODMOVPROD,

MP.CODEMPTM,

TM.CODEMP,

MP.CODFILIALTM,

TM.CODFILIAL,

(MP.sldmovprod*MP.CUSTOMPMMOVPROD) SALDO,

FORN.RAZFOR

CODTIPOMOV

FROM EQMOVPROD MP, EQTIPOMOV TM

INNER JOIN EQPRODUTO eq on mp.codprod = eq.codprod

inner join cpcompra cp on mp.codcompra = cp.codcompra

inner join cpforneced forn on cp.codfor =forn.codfor

where MP.CODEMPTM=TM.CODEMP AND MP.CODFILIALTM=TM.CODFILIAL AND

MP.CODTIPOMOV=TM.CODTIPOMOV AND tipoprod='P' and mp.codvenda is null

;

---
Este email foi escaneado pelo Avast antivírus.
https://www.avast.com/antivirus

[Non-text portions of this message have been removed]


Livre de vírus. www.avast.com.