Subject Re: [firebird-support] FB2.0 - Baffled by strange SQL Parse Error: Parameter name expected
Author Svein Erling Tysvaer
Hi Mitch!

I'm just guessing, but I notice that :V_DOCLINE_SHOWS_SUPPL_INV_COMPLETE
contains 34 characters and :V_ITEM_SUPPL_INV_COMPLETE_PCNT_2 contains
32. May the limit for such names be 31 characters?

HTH,
Set

mlq97 wrote:
> (FB 2.0) I have a stored procedure (1 input, 0 output parameters)
> which contains several queries used to obtain aggregate values and
> place the results into variables. At the end of the procedure there is
> an update statement (see below) which uses these variables to update a
> table.
>
> The procedure compiles and runs ok and when I step thru using a
> debugger the variables seem to be correct immediately prior to
> executing the update statement.
>
> When I try to execute the update I get "SQL Parse Error: Parameter
> name expected", but all the parameter values appear to be correct,
> including :v_item_id. If I
> execute just the update statement separately, there is no error and
> the update is successful.
>
> What might I be doing wrong?
>
> Thanks - Mitch
>
> UPDATE item
> SET
> item.ITEM_QTY_ON_DRAFT_POS = :V_QTY_ON_DRAFT_POS,
> item.ITEM_QTY_ON_POSTED_ACTIVE_POS = :v_qty_ordered,
> item.ITEM_VALUE_ON_POSTED_ACTIVE_POS = :V_VALUE_ON_ISSUED_ACTIVE_POS,
> item.ITEM_VALUE_ON_SUPPLIER_INVOICES = :V_VALUE_ON_SUPPL_INVOICES,
> item.ITEM_SUPP_INVOICES_COMPLETE2 =
> :V_DOCLINE_SHOWS_SUPPL_INV_COMPLETE,
> item.ITEM_FINAL_ACTUAL_COST = :V_ITEM_FINAL_ACTUAL_COST,
> item.ITEM_COST_VARIATION = :V_ITEM_COST_VARIATION,
> item.ITEM_SUPP_INV_PCNT_COMPLETE2 = :V_ITEM_SUPPL_INV_COMPLETE_PCNT_2,
> item.ITEM_SUPPL_INV_PROFORMA_ONLY = :V_ITEM_SUPPL_INV_PROFORMA_ONLY,
> item.ITEM_COST_VARIATION_REMARK = :V_ITEM_VARIATION_REMARK,
> item.ITEM_RFQD = :V_RFQ_ISSUED_DATE,
> item.ITEM_ORDD = :V_PO_ISSUED_DATE
> WHERE
> item.item_id = :v_item_id;