Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make a temp. file
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00111140
Message ID:
00111153
Views:
18
>1. My "Order_items" file had over 500000 records.
>Now i want to make a temporary file, it's about the Order no. "12345" (there have 5 items only)
>I will coding as below :
>SELE ORDER_ITEMS
>SEEK ORDER_FILE->ORDER_NO
>COPY TO TEMP_FILE WHILE ORDER_NO == ORDER_FILE->ORDER_NO
>USE TEMP_FILE IN 0 EXCL
>SELE TEMP_FILE
>
>Now i want to write in SQL ways, how to do ?? And i want to know, is't SQL must be faster then "SEEK + COPY TO (WHILE...)"
>
>
>2. How to add more fields into existing file.


Hello Hs Wong,

Ans - 1

If you use SQL with proper indexed WHERE clause, you can get the advantage
of world's fastest data retrieval mechanism that is RushMore Tecnology. you can
achieve this by

LOCAL lcorderno
lcorderno = order_file.order_no

SELECT * FROM order_items
WHERE order_no == lcorderno
INTO CURSOR temp_file

*-- You can store it to table by issuing INTO TABLE.

Ans - 2

You would like to use ALTER TABLE temp_file ......
See help topic ALTER TABLE for more details.

Bye
Jayesh
- Jayesh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform