Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert blank after then scatter
Message
De
21/10/2011 07:09:52
 
 
À
21/10/2011 00:34:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01527024
Message ID:
01527030
Vues:
41
You don't really want to append blank, you want to Insert the same data twice! Then do exactly that.

Another thing to keep in mind is that the order of the records should be irrelevant. In other words, if you want a record to appear twice, insert it twice when you work with that record.

>Dear Experts
>
>I have following codes
>
>
>CREATE CURSOR sales(sno n(4),code1 c(4),rate n(7,2))
>
>INSERT INTO sales values(1828,"1401",1548.65)
>INSERT INTO sales values(1828,"1402",1485.15)
>INSERT INTO sales values(1825,"1402",1300.05)
>INSERT INTO sales values(1825,"1402",1205.15)
>INSERT INTO sales values(1825,"1403",1780.35)
>INSERT INTO sales values(1825,"1403",1905.15)
>INSERT INTO sales values(1828,"1402",1800.05)
>INSERT INTO sales values(1828,"1402",1800.05)
>
>
>sno---- code1---- rate
>1828---- 1401---- 1548.65
>1828---- 1402---- 1485.15
>1825---- 1402---- 1300.05
>1825---- 1402---- 1205.15
>1825---- 1403---- 1780.35
>1825---- 1403---- 1905.15
>1828---- 1402---- 1800.05
>1828---- 1402---- 1800.05
>
>
>
>
>sno---- code1---- rate
>1828---- 1401---- 1548.65
>1828---- 1402---- 1485.15
>1825---- 1402---- 1300.05
>1825---- 1402---- 1205.15 && I want to append two blank records after this record then copy above two records in blank rows
>
>
>1825---- 1403---- 1780.35
>1825---- 1403---- 1905.15
>1828---- 1402---- 1800.05
>1828---- 1402---- 1800.05
>
>I need dbf as following final position
>
>sno---- code1---- rate
>1828---- 1401---- 1548.65
>1828---- 1402---- 1485.15
>1825---- 1402---- 1300.05
>1825---- 1402---- 1205.15
>1825---- 1402---- 1300.05
>1825---- 1402---- 1205.15
>1825---- 1403---- 1780.35
>1825---- 1403---- 1905.15
>1828---- 1402---- 1800.05
>1828---- 1402---- 1800.05
>
>
>See attachment please for more detail
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform