You can't use variable in SELECT column list. My usual workaround is to
replace variable by some constant value (which is not allowed for variable)
and after INSERT execute UPDATE for that column to assign a value from
variable.
Nelson Fredsell <nfredsel@cornercap.com> wrote in article
<34b541a1.30019417@news1.alterdial.uu.net>...
> I'm having trouble making a batch update thru i4gl. The manuals
> say I can use a SELECT statement instead of a VALUES statement,
> but I cannot find examples. The following statement compiles
> just fine, but I get a syntax error (-201) when executing. This
> statement works fine in dbaccess when I use actual values for the
> variables (p_monthend, p_fundcode).
>
> insert into fphlog...
> select fp.fundcode, fp.partnercode, p_monthend, fh.nav,
> fp.lastshares, 0,0,0,0...
> Nelson
>
> nfredsel@cornercap.com
> Cornerstone Capital
> Atlanta, GA
>
>
--
Zdeno Mikl' SOFTEC s. r. o.
tel.: +421 7 273 805 Kutuzovova 23
fax.: +421 7 272 537 831 03 Bratislava
e-mail: ash@softec.sk Slovakia