quando eu tento executar o comando abaixo, o sistema me exibe a mensagem: "List index out of bounds(0)".
Code: Select all
SELECT
DISTINCT
CAST(EST_PROD.CD_UN_CP AS VARCHAR) + 'CP' AS UNID
, EST_PROD_UN_MED.DS_UN AS DESCR
FROM
EST_NF_ENT_IT
INNER JOIN EST_PROD ON
EST_NF_ENT_IT.CD_EMP = EST_PROD.CD_EMP
AND EST_NF_ENT_IT.CD_PROD = EST_PROD.CD_PROD
INNER JOIN EST_PROD_UN_MED ON
EST_PROD.CD_EMP = EST_PROD_UN_MED.CD_EMP
AND EST_PROD.CD_UN_CP = EST_PROD_UN_MED.CD_CTR_UN
INNER JOIN UFD_EST_NF_ENT_EXP_EF (1, 8, '2008-01-01' , '2008-01-10' ) AS UFD_EST_NF_ENT_EXP_EF ON
UFD_EST_NF_ENT_EXP_EF.CD_EMP = EST_NF_ENT_IT.CD_EMP
AND UFD_EST_NF_ENT_EXP_EF.CD_FILIAL = EST_NF_ENT_IT.CD_FILIAL
AND UFD_EST_NF_ENT_EXP_EF.CD_NF = EST_NF_ENT_IT.CD_NF
WHERE
UFD_EST_NF_ENT_EXP_EF.POSSUI_PROD = 0
AND UFD_EST_NF_ENT_EXP_EF.STS_NF <> 'CANCELADA'
AND UFD_EST_NF_ENT_EXP_EF.TP_FORN IN (0, 2, 3, 4, 6)
Code: Select all
CAST(EST_PROD.CD_UN_CP AS VARCHAR) + 'CP' AS UNID
Code: Select all
EST_PROD.CD_UN_CP AS UNID
Estou usando o Delphi 2007, Zeos 6.6.5-stable e o MS-SQL 2005.