Subject RE: [firebird-support] FOR EXECUTE STATEMENT (Error when trying to runt a stored procedure)
Author Leyne, Sean
> 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

Are you sure that you can pass parameters to EXECUTE STATEMENT?

Where are you passing in the parameters?

I have used EXECUTE STATEMENT many times, but never with input
parameters -- Generally, I declare a SelectStatement VARCHAR(4000)
variable and then build up the statement as required by the parameters I
want to pass in. I use a variable because I can easily debug the
statement to double check the SQL.


Sean