Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Move data
Message
De
10/02/2002 22:49:37
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
 
 
À
10/02/2002 22:26:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00618148
Message ID:
00618156
Vues:
10
Hi,

You may try to look is there any tool in Download can accomplish this.
But it doesn't seem diffcult;try:


1. DIMENSION aRecord[2]
SCAN
    SCATTER FIELDS CO_NAMEA,CO_ADDA TO aRecord
    SELECT TABLEB
    APPEND BLANK IN TABLEB
    GATHER FROM aRecord
ENDSCAN

2. Select CO_NAMEA as CO_NAMEB, CO_ADDA as CO_ADDB
   FROM TABLEA INTO CURSOR TMP_TA
SELECT TABLEB
APPEND FROM DBF('TABLEA')

:) Wilfred

>Hi all,
>
>I need to move data from 1 table to another table. As there fields' name is different and so I cann't just use 'APPRND FROM TABLEA' to do this. I try to use INSERT BUT VFP6.0 do not support subquery like 'INSERT INTO TABLEB(CO_NAMEB, CO_ADDB) (SELE CO_NAMEA, CO_ADDA FROM TABLEA)' there is syntax error when i run the query. As the field name and table stru is different, it seems difficult for me. I know I can use program and process it record by record but I don't wish to do it as it need some time as I have a large number of records in table. I wish I can just use one statmenet to move data.
>TABLEA:
>CO_NAMEA, CO_ADDA, CO_MANAGER, CO_REF
>
>TABLEB:
>CO_NAMEB, CO_ADDB, CO_REMARK
>
>thanks.
>Linda
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform