Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Divide mytable
Message
 
To
07/09/2006 07:56:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01151626
Message ID:
01151687
Views:
28
This message has been marked as the solution to the initial question of the thread.
>hi,
>thank you very much,yes shure it works
>
>i try to add serial number for every table as under but i see another numbers
>
>
>USE RIS_RANDOMS
>COPY TO (farrea[1,1]) FOR area < 4 AND residet="1"
>REPLACE num WITH RECNO() ALL FOR area < 4 AND residet="1"
>COPY TO (farrea[1,2]) FOR area < 4 AND residet="2"
>REPLACE num WITH RECNO() ALL FOR area < 4 AND residet="1"
>FOR myvar = 4 TO 14
>    COPY TO (farrea[myvar,1]) FOR area=m.myvar AND residet="1"
>    REPLACE num WITH RECNO() ALL
>    COPY TO (farrea[myvar,2]) FOR area=m.myvar AND residet="2"
>    REPLACE num WITH RECNO() ALL
>NEXT
>
>

Try this
USE RIS_RANDOMS
COPY TO (farrea[1,1]) FOR area < 4 AND resident="1"
USE (farrea[1,1]) IN 0
REPLACE num WITH RECNO() ALL IN (farrea[1,1])
USE IN (farrea[1,1])

COPY TO (farrea[1,2]) FOR area < 4 AND resident="2"
USE (farrea[1,2]) IN 0
REPLACE num WITH RECNO() ALL IN (farrea[1,2])
USE IN (farrea[1,2])

FOR myvar = 4 TO 14
    COPY TO (farrea[myvar,1]) FOR area=m.myvar AND resident="1"
    USE (farrea[myvar,1]) IN 0
    REPLACE num WITH RECNO() ALL IN (farrea[myvar,1])
    USE IN (farrea[myvar,1])

    COPY TO (farrea[myvar,2]) FOR area=m.myvar AND resident="2"
    USE (farrea[myvar,2]) IN 0
    REPLACE num WITH RECNO() ALL IN (farrea[myvar,2])
    USE IN (farrea[myvar,2])
NEXT
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform