Subject | FOR EXECUTE STATEMENT (Error when trying to runt a stored procedure) |
---|---|
Author | SoftTech |
Post date | 2009-04-23T20:58:27Z |
Can anyone look at this and tell me why I receive an error (Column Unknown
V_CLT_ID) when trying to execute this procedure? V_CLT_ID is defined in the
input parameters.
FOR EXECUTE STATEMENT 'SELECT DISTINCT ATD.ACCT_TRAN_ID,
ATD.ACCT_TRAN_DETAIL_ID,
ATDT.ACCT_TASK_ID,
CAST(ATDT.CREATE_DATE AS DATE) AS
CREATE_DATE,
CAST(ATDT.PROCESSED_DATE AS DATE)
AS PROCESSED_DATE,
ATD.ACCT_ID,
ATD.CASE_ID,
FC.FEE_CODE,
FC.DESCRIPTION AS FEE_DESC,
ATDTF.FEE_ID,
ATDTF.FEE_DATE,
ATDTF.FEE_AMOUNT,
C.NAME AS FILING_COUNTY_NAME,
CS.SITE_REF_NO,
CS.SITE_NAME,
CLT.GOVERNMENT_CLIENT,
T.TRAN_CODE,
T.TRAN_TYPE_ID
FROM ACCT_TRAN_DETAIL_TASK_FEE ATDTF
JOIN FEE_CODE FC ON FC.FEE_ID =
ATDTF.FEE_ID
JOIN ACCT_TRAN_DETAIL_TASK ATDT ON
ATDT.ACCT_TRAN_ID = ATDTF.ACCT_TRAN_ID
AND ATDT.ACCT_TRAN_DETAIL_ID =
ATDTF.ACCT_TRAN_DETAIL_ID
AND ATDT.ACCT_TASK_ID =
ATDTF.ACCT_TASK_ID
JOIN ACCT_TRAN_DETAIL_TASK_DEBTS ATDTD
ON ATDTD.ACCT_TRAN_ID = ATDT.ACCT_TRAN_ID
AND ATDTD.ACCT_TRAN_DETAIL_ID =
ATDT.ACCT_TRAN_DETAIL_ID
AND ATDTD.ACCT_TASK_ID =
ATDT.ACCT_TASK_ID
JOIN DEBT D ON D.ACCT_ID = ATDTD.ACCT_ID
AND D.DEBT_NO = ATDTD.DEBT_NO
JOIN ACCT_TRAN_DETAIL ATD ON
ATD.ACCT_TRAN_ID = ATDT.ACCT_TRAN_ID
AND ATD.ACCT_TRAN_DETAIL_ID =
ATDT.ACCT_TRAN_DETAIL_ID
JOIN ACCT_TRAN_MASTER ATM ON
ATM.ACCT_TRAN_ID = ATD.ACCT_TRAN_ID
JOIN TE_TRAN T ON T.TRAN_ID =
ATM.TRAN_ID
JOIN ACCT_CASE AC ON AC.ACCT_ID =
ATD.ACCT_ID
AND AC.CASE_ID = ATD.CASE_ID
JOIN CLIENT_SITE CS ON CS.CLT_SITE_ID =
AC.CLT_SITE_ID
JOIN CLIENT CLT ON CLT.CLT_ID =
CS.CLT_ID
JOIN COUNTY C ON C.COUNTY_ID =
AC.FILING_COUNTY_ID
WHERE (ATDT.QUE_STATUS_CODE = ''C''
AND D.ACCOUNT_EXPORT_SETUP_ID IS NULL
AND ((:V_CLT_ID IS NULL) or (AC.CLT_ID
= :V_CLT_ID))
AND ((:V_CLT_SITE_ID IS NULL) or
(AC.CLT_SITE_ID = :V_CLT_SITE_ID))
AND ((:V_FILING_COUNTY_ID IS NULL) or
(AC.FILING_COUNTY_ID = :V_FILING_COUNTY_ID))
AND ATM.COMPANY_ID = :V_COMPANY_ID
AND ((:V_TRAN_ID_LIST IS NULL) or
(ATM.TRAN_ID IN (' || :V_TRAN_ID_LIST || ')))
AND (FC.FEE_CODE IN (:V_FEE_CODE1,
:V_FEE_CODE2, :V_FEE_CODE3))
AND (CAST(ATDTF.FEE_DATE AS DATE)
BETWEEN :V_BEGIN_DATE AND :V_END_DATE))'
INTO :iAcctTranID, :iAcctTranDetailID,
:iAcctTaskID, :dFeeCreateDate,
:dProcessedDate, :iAcctID,
:iCaseID,
:R_FEE_CODE, :R_FEE_DESC, :iFeeID,
:R_FEE_DATE, :R_FEE_AMOUNT,
:R_FILING_COUNTY_NAME,
:R_CLT_SITE_REF_NO, :R_CLT_SITE_NAME,
:iGovernmentClient, :sTranCode,
:iTranTypeID DO
BEGIN
/* Code Here */
END
V_CLT_ID) when trying to execute this procedure? V_CLT_ID is defined in the
input parameters.
FOR EXECUTE STATEMENT 'SELECT DISTINCT ATD.ACCT_TRAN_ID,
ATD.ACCT_TRAN_DETAIL_ID,
ATDT.ACCT_TASK_ID,
CAST(ATDT.CREATE_DATE AS DATE) AS
CREATE_DATE,
CAST(ATDT.PROCESSED_DATE AS DATE)
AS PROCESSED_DATE,
ATD.ACCT_ID,
ATD.CASE_ID,
FC.FEE_CODE,
FC.DESCRIPTION AS FEE_DESC,
ATDTF.FEE_ID,
ATDTF.FEE_DATE,
ATDTF.FEE_AMOUNT,
C.NAME AS FILING_COUNTY_NAME,
CS.SITE_REF_NO,
CS.SITE_NAME,
CLT.GOVERNMENT_CLIENT,
T.TRAN_CODE,
T.TRAN_TYPE_ID
FROM ACCT_TRAN_DETAIL_TASK_FEE ATDTF
JOIN FEE_CODE FC ON FC.FEE_ID =
ATDTF.FEE_ID
JOIN ACCT_TRAN_DETAIL_TASK ATDT ON
ATDT.ACCT_TRAN_ID = ATDTF.ACCT_TRAN_ID
AND ATDT.ACCT_TRAN_DETAIL_ID =
ATDTF.ACCT_TRAN_DETAIL_ID
AND ATDT.ACCT_TASK_ID =
ATDTF.ACCT_TASK_ID
JOIN ACCT_TRAN_DETAIL_TASK_DEBTS ATDTD
ON ATDTD.ACCT_TRAN_ID = ATDT.ACCT_TRAN_ID
AND ATDTD.ACCT_TRAN_DETAIL_ID =
ATDT.ACCT_TRAN_DETAIL_ID
AND ATDTD.ACCT_TASK_ID =
ATDT.ACCT_TASK_ID
JOIN DEBT D ON D.ACCT_ID = ATDTD.ACCT_ID
AND D.DEBT_NO = ATDTD.DEBT_NO
JOIN ACCT_TRAN_DETAIL ATD ON
ATD.ACCT_TRAN_ID = ATDT.ACCT_TRAN_ID
AND ATD.ACCT_TRAN_DETAIL_ID =
ATDT.ACCT_TRAN_DETAIL_ID
JOIN ACCT_TRAN_MASTER ATM ON
ATM.ACCT_TRAN_ID = ATD.ACCT_TRAN_ID
JOIN TE_TRAN T ON T.TRAN_ID =
ATM.TRAN_ID
JOIN ACCT_CASE AC ON AC.ACCT_ID =
ATD.ACCT_ID
AND AC.CASE_ID = ATD.CASE_ID
JOIN CLIENT_SITE CS ON CS.CLT_SITE_ID =
AC.CLT_SITE_ID
JOIN CLIENT CLT ON CLT.CLT_ID =
CS.CLT_ID
JOIN COUNTY C ON C.COUNTY_ID =
AC.FILING_COUNTY_ID
WHERE (ATDT.QUE_STATUS_CODE = ''C''
AND D.ACCOUNT_EXPORT_SETUP_ID IS NULL
AND ((:V_CLT_ID IS NULL) or (AC.CLT_ID
= :V_CLT_ID))
AND ((:V_CLT_SITE_ID IS NULL) or
(AC.CLT_SITE_ID = :V_CLT_SITE_ID))
AND ((:V_FILING_COUNTY_ID IS NULL) or
(AC.FILING_COUNTY_ID = :V_FILING_COUNTY_ID))
AND ATM.COMPANY_ID = :V_COMPANY_ID
AND ((:V_TRAN_ID_LIST IS NULL) or
(ATM.TRAN_ID IN (' || :V_TRAN_ID_LIST || ')))
AND (FC.FEE_CODE IN (:V_FEE_CODE1,
:V_FEE_CODE2, :V_FEE_CODE3))
AND (CAST(ATDTF.FEE_DATE AS DATE)
BETWEEN :V_BEGIN_DATE AND :V_END_DATE))'
INTO :iAcctTranID, :iAcctTranDetailID,
:iAcctTaskID, :dFeeCreateDate,
:dProcessedDate, :iAcctID,
:iCaseID,
:R_FEE_CODE, :R_FEE_DESC, :iFeeID,
:R_FEE_DATE, :R_FEE_AMOUNT,
:R_FILING_COUNTY_NAME,
:R_CLT_SITE_REF_NO, :R_CLT_SITE_NAME,
:iGovernmentClient, :sTranCode,
:iTranTypeID DO
BEGIN
/* Code Here */
END