Fórum Stored Procedure - erro #237940

16/06/2004

0

O QUE PODE ESTAR ERRADO NA CRIAÇÃO DESTA PROCEDURE
CREATE PROCEDURE  PROC_IMP_NOTAFISCAL(CONTROLE_DATA DATE, CONTROLE_NUMERO INTEGER)
AS
begin
SELECT Nfa_nota.NOTA_NUMERO, Nfa_nota.NOTA_DATA, Nfa_nota.NOTA_DTORGARREC,
       Nfa_nota.NOTA_ALIQT, Nfa_itemnota.ITEM_QTDE, Nfa_itemnota.ITEM_UNIDADE,
       Nfa_itemnota.ITEM_DISCRIM, Nfa_itemnota.ITEM_VALUNIT, Nfa_empresa.EMP_NOME,
       Nfa_empresa.EMP_LOG, Nfa_empresa.EMP_ENDE, Nfa_empresa.EMP_BAIRRO,
       Nfa_empresa.EMP_NUME, Nfa_empresa.EMP_INSCMUN, Nfa_empresa.EMP_CPF,
       Nfa_empresa.EMP_CNPJ, Nfa_empresa.EMP_CIDADE, Nfa_empresa.EMP_UF,
       Nfa_empresa.EMP_TELCONT, Nfa_prestserv.PSERV_NOME,
       Nfa_prestserv.PSERV_ENDE, Nfa_prestserv.PSERV_NUME,
       Nfa_prestserv.PSERV_INSCMUN, Nfa_prestserv.PSERV_CPF,
       Nfa_prestserv.PSERV_CNPJ, Nfa_prestserv.PSERV_UF,
       Nfa_prestserv.PSERV_TELCONT, Nfa_prestserv.PSERV_NIT,
       Nfa_tplog.NFATPLOG_NOME, Nfa_bairro.NFABAIR_NOME,
       Nfa_cidades.NFACID_NOME, Nfa_orgarrec.ORGARC_NOME
FROM NFA_NOTA Nfa_nota
   INNER JOIN NFA_ITEMNOTA Nfa_itemnota
   ON  (Nfa_nota.NOTA_NUMERO = Nfa_itemnota.NOTA_NUMERO)  
   AND  (Nfa_nota.NOTA_DATA = Nfa_itemnota.NOTA_DATA)  
   INNER JOIN NFA_EMPRESA Nfa_empresa
   ON  (Nfa_empresa.EMP_COD = Nfa_nota.NOTA_CODEMP)  
   INNER JOIN NFA_PRESTSERV Nfa_prestserv
   ON  (Nfa_prestserv.PSERV_COD = Nfa_nota.NOTA_CODPSERV)  
   INNER JOIN NFA_ORGARREC Nfa_orgarrec
   ON  (Nfa_orgarrec.ORGARC_COD = Nfa_nota.NOTA_ORGARREC)  
   INNER JOIN NFA_TPLOG Nfa_tplog
   ON  (Nfa_tplog.NFATPLOG_COD = Nfa_prestserv.PSERV_LOG)  
   INNER JOIN NFA_BAIRRO Nfa_bairro
   ON  (Nfa_bairro.NFABAIR_COD = Nfa_prestserv.PSERV_BAIRRO)  
   INNER JOIN NFA_CIDADES Nfa_cidades
   ON  (Nfa_cidades.NFACID_COD = Nfa_prestserv.PSERV_CIDADE)

end

ELE DA ERRO NO ´END´ ? :oops:


Duarteol

Duarteol

Responder

Posts

16/06/2004

Nildo

Caixa alta não é permitida no título da mensagem. E por favor, quando for fazer referencias à códigos, utilize as tags
 e 
.


Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar