Subject Re: [IBDI] Loosing My Mind-Little Help
Author Robert F. Tulloch
Hi: Oops

> This one works fine:
>
> UPDATE MEMPAY2 M2
> SET M2.CRDREM_LET = :InvoiceDate, M2.ID =
> (SELECT M.ID FROM MEMBERS M
> WHERE (M.ID = M2.ID AND
> (M.STATUS_MEM = 'ACTIVE' OR M.STATUS_MEM = 'ASSOCIATE')))
> WHERE (M2.CRDRPT_RNW IS NOT NULL AND M2.CRDRPT_PD IS NULL AND
> M2.CRDREM_LET IS NULL AND
> M2.CRDRPT_RNW >= '08/30/2000' AND M2.CRDRPT_RNW <= '11/13/2000')
>
>
> This one fails both in code and IBConsole with error: Column
> Unknown -206
>
> UPDATE MEMPAY2 M2
> SET M2.REMIND_LET = :InvoiceDate, M2.ID =
> (SELECT M.ID FROM MEMBERS M
> WHERE (M.ID = M2.ID AND M.RENEW_DTE = M2.RENEW_DATE AND
> (M.STATUS_MEM = 'ACTIVE' OR M.STATUS_MEM = 'ASSOCIATE')))
> WHERE (M2.RENEW_DATE IS NOT NULL AND M2.DATE_PAID IS NULL AND
> M2.REMIND_LET IS NULL AND
> M2.RENEW_DATE >= '08/30/2000' AND M2.RENEW_DATE <= '11/13/2000')

The reason this did not work Ok is that I passed the param
:InvoiceDate twice and for some reason that was looked upon as a
column name??? Weird.

Oh well.

Thanks if anyone even thought about this.

Best
regards