Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting Records in Between
Message
De
21/07/2013 13:54:04
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
21/07/2013 05:38:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01578969
Message ID:
01578980
Vues:
59
>If I have table say A and another table Say B and if I want to insert records of Table B in Table A, I may do it like this,
>
>
>Insert into A.DBF (Filed1) select Field1 from Table B.
>
>
>But how to insert the Table B records if I want to insert the Table B records after the record Number 10 i.e Recno() 10 of Table A.
>
>I.e How to insert Table B records in Table A after the Table A RECNO()>10

As Hilmar said, it's a bad practice to physically organize records.

Add a numeric field with decimals. Number the records in tableB to fit between 10 and 11.

When your records from tableB are added to records in tableA, the will have a sequence that you want.
TableA       TableB
Sequence     Sequence
1                   10.001
2                   10.002
3                   10.003
4
5
6
7
8
9
10
11
After the records are added, renumber the entire sequence so they are integers.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform