Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace record from other dbf
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00994807
Message ID:
00994910
Views:
13
>Boris repacing only one record

This code replaces 25 records:
CREATE CURSOR test (C1 C(10))
CREATE CURSOR Test2 (C1 C(10))

FOR asd = 1 TO 50
    IF asd < 26
       INSERT INTO Test2 VALUES (TRANSFORM(asd))
    ELSE
       INSERT INTO Test2 VALUES (TRANSFORM(asd-25))
    ENDIF
NEXT

INSERT INTO Test (C1) SELECT DIST C1 FROM Test2 GROUP BY c1
SELECT Test
BROW
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform