Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert blank after then scatter
Message
From
21/10/2011 07:09:52
 
 
To
21/10/2011 00:34:20
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01527024
Message ID:
01527030
Views:
42
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
Previous
Reply
Map
View

Click here to load this message in the networking platform