Subject Copying records from a table to other table
Author Emerson Muniz
Dear,

I know that is a simple mistake mine.

I'm using the IB Expert the Script Executive and trying to copy records from a table to another table.

My script is:
INSERT INTO cpforneced ( CODEMP, CODFILIAL, CODFOR,
RAZFOR, CODEMPTF, CODFILIALTF, CODTIPOFOR, CODEMPBO,
CODFILIALBO, CODBANCO, NOMEFOR, DATAFOR, ATIVOFOR, PESSOAFOR,
CNPJFOR, CPFFOR, INCFOR, RGFOR, ENDFOR, NUMFOR,
COMPLFOR, BAIRFOR, CEPFOR, CIDFOR, UFFOR, CONTFOR,
FONEFOR, FAXFOR, AGENCIAFOR, CONTAFOR, EMAILFOR )
values
( 99, 1, c01for.cod_for, c01for.raz_soc, 99, 1, 1,
NULL, NULL,NULL, c01for.nom_fan, NULL, 'N', c01for.tip_pes,
c01for.nro_cgc,c01for.nro_cpf,null,c01for.des_end, null,
null, c01for.bai_end, c01for.cep_end, c01for.nom_cid,
c01for.sig_est, c01for.nom_con, c01for.fon_001,
c01for.fax_001,null, null, c01for.end_ema )

There the two tables, C01FOR and CPFORNED on the same database, the CPFORNED is the destination and C01FOR is the source data, that was migrate from a DBF to inside the database.

The error that I have is:
/*******************************************************************************
The next statement causes the following error:
Column does not belong to referenced table.
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
C01FOR.COD_FOR.
At line 8, column 17.
*******************************************************************************/

There the table C01FOR and the column COD_FOR normaly.

What I'm doing wrong ?

Thank you very much.

Emerson Muniz
emersonmuniz@...
http://emersonmuniz.googlepages.com/home

Nova Andradina - MS - Brasil



____________________________________________________________________________________
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265

[Non-text portions of this message have been removed]