Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Takes FOREVER!
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01081380
Message ID:
01081424
Views:
8
Well folks, here's the query now. It's taking about 2-3 minutes to run, which I think
is the best I'm gonna get.
cWhere = "BETWEEN(WeekOf, {01/01/1990},{12/31/2004})"

SELECT DocId, BoId, BoIdBase, RecType, OrdQty, Gross, StatName, ClientId, BInit,;
       WeekOf, DStat_Net, DClnt_Net,DLComm, 0.00 AS NumCleared;
  FROM LineItems;
  WHERE &cWhere;
  INTO TABLE LineTemp
Notice BrokerId is no longer there. I will filter it out later.

The index expression for Weekof is simply WeekOf, which is a date.

Thanks!






>
>CREATE CURSOR TempBrok (BrokerID C(2))   -- or whatever the length is
>INSERT INTO TempBrok VALUES ('MC')
>INSERT INTO TempBrok VALUES ('')
>
>
>
>SELECT DocId, BoId, BoIdBase, RecType, OrdQty, Gross, StatName, ClientId, BInit,;
>       WeekOf, DStat_Net, DClnt_Net,DLComm, 0.00 AS NumCleared;
>  FROM LineItems;
>     JOIN TempBrok ON TempBrok.BrokerID = LineItems.BrokerID
>     WHERE  (your date clause)
>  INTO TABLE LineTemp
>
>
>However, I missed from your first post the # of rows you're bringing back...Mike Yearwood may be right, depending on how they're being brought down (across a LAN or whatever), that's gonna take some time.
>
>Kevin
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform