Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting Records into DBF
Message
De
02/07/2013 14:57:16
 
 
À
02/07/2013 14:53:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01577675
Message ID:
01577678
Vues:
56
>Suppose I have a table A with 100 records and Table B with 25 Records. I want to insert the
>records of Table B in Table A, after 75 records of Table A.
>I.e First 75 recodrs shoud be of A , next 25 of B and than 25 of A. How it will be done ?


Several ways. I think you want a SQL solution? Something like (untested) this if tablea and tableb have the same structure:
SELECT * ;
    FROM tablea ;
    WHERE RECNO() <= 75 ;
UNION ;
SELECT * ;
    FROM tableb ;
    WHERE RECNO() <= 25 ;
UNION ;
SELECT * ;
    FROM tablea ;
    WHERE BETWEEN(RECNO(), 76, 100) ;
    INTO TABLE result.dbf
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform