Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Divide mytable
Message
 
To
07/09/2006 04:59:23
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:
01151647
Views:
25
May be
DIMENSION farrea[14,3]
farrea[1,1]  = "AmmanA"
farrea[1,2]  = "AmmanR"

farrea[4,1]  = "ZarqA"
farrea[4,2]  = "ZarqR"

farrea[5,1]  = "b51"
farrea[5,2]  = "b52"

farrea[6,1]  = "b61"
farrea[6,2]  = "b62"

farrea[7,1]  = "b71"
farrea[7,2]  = "b72"

farrea[8,1]  = "b81"
farrea[8,2]  = "b82"

farrea[9,1]  = "b91"
farrea[9,2]  = "b92"

farrea[10,1]  = "b101"
farrea[10,2]  = "b102"

farrea[11,1]  = "b111"
farrea[11,2]  = "b112"

farrea[12,1]  = "b121"
farrea[12,2]  = "b122"

farrea[13,1]  = "b131"
farrea[13,2]  = "b132"

farrea[14,1]  = "AqabA"
farrea[14,2]  = "AqabR"

USE RIS_RANDOMS
COPY TO (farrea[1,1]) FOR area < 4 AND resident="1"
COPY TO (farrea[1,2]) FOR area < 4 AND resident="2"

FOR myvar = 4 TO 14
    COPY TO (farrea[myvar,1]) FOR area=m.myvar AND resident="1"
    COPY TO (farrea[myvar,2]) FOR area=m.myvar AND resident="2"
NEXT
>hi all,
>
>i need help to divide my table to 24 tables
>
>my table have filed (area) from 1 to 14, and another filed (resident)
>from 1 to 2,
>
>USE RIS_RANDOMS
>if area=1 or 2 or 3 and resident="1"
>COPY STRU TO AmmanA
>endif
>
>if area=1 or 2 or 3 and resident="2"
>COPY STRU TO AmmanR
>endif
>
>if area=4  and resident="1"
> COPY STRU TO ZarqA
>ENDIF
>
>if area=4  and resident="2"
> COPY STRU TO ZarqR
>ENDIF
>....
>.
>.
>.
>if area=14  and resident="1"
> COPY STRU TO AqabA
>ENDIF
>
>if area=14  and resident="2"
> COPY STRU TO AqabR
>ENDIF
>
>thanks
_______________________________________________________________
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