Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT-SQL
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00519356
Message ID:
00519617
Views:
12
>>I have noticed that if I use a SELECT-SQL like:
>>
>>SELECT * FROM TABLE , I get the result pretty fast. When ever I complicate things as in:
>>SELECT * FROM TABLE ;
>>WHERE BETWEEN(DATE,DATE1,DATE2) AND INLIST(TRANCODE,'26','27') ;
>>INTO TABLE2
>>
>>Things slow down to a point wher you think it is never going to get the data I requested. all of the tables of the tables are out on the network server. I have noticed that sometimes it makesa difference if I bring the results tabel over on the users PC. Any way to get around this problem? I have indexes on the tables for that items I usally ask for. I read somewhere once that you can open and order the table ahead o time and it helps the SQL do it's thing. IS this true?
>
I don't think that SELECT * FROM TABLE INTO TABLE table2 would be fast.
But SELECT * FROM TABLE INTO CURSOR cursor2 will be because foxpro just opens table2 again with alias cursor2. You can confirm it issuing ? DBF().
There are also SQL-select equivalents of foxpro BETWEEN and INLIST function.
SELECT * FROM TABLE ;
    WHERE date BETWEEN DATE1 and DATE2 AND TRANCODE IN('26','27') ;
    INTO TABLE2
I wouldn't make this select run faster but could make easier to port code to MS SQL or Oracle.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform