Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow replace the record
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01194547
Message ID:
01194549
Views:
16
>I am replaceing the records wiht these codes. require some advice or sql help.only 900 records, timing is more 80 seconds.
>
>  Select student
>         Set Order To CODE
>         Set Filter To admtd=1
>         Goto Top
>         Do While !Eof()
>             grno = code
>             mscode = scode
>             mlcode = lcode
>             msec = sec
>             Select dly
>             Set Order To CODE
>             Seek grno
>             If Found()
>                 Select student
>                 Skip
>             Else
>                 Select dly
>                 Append Blank
>                 Replace code With grno
>                 Replace date With pdate
>                 Replace type With 1
>                 Replace category With "P"
>                 Replace scode With mscode
>                 Replace lcode With mlcode
>                 Replace sec With msec
>                 Select student
>                 Skip
>             Endif
>         Enddo
>     Endif
> Endif
INSERT INTO dly (code,date, type, category, scode, lcode, sec);
SELECT Student.code,
       pdate,; && I don't see from where that variable comes from in your coude
       1,;
       [P],;
       Student.scode,;
       Student.lcode,;
       Student.sec;
FROM Student;
LEFT JOIN Dly ON Student.Code = Dly.Code;
WHERE Dly.Code IS NULL
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