Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting Records into DBF
Message
From
02/07/2013 14:57:16
 
 
To
02/07/2013 14:53:22
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01577675
Message ID:
01577678
Views:
58
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform