Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Takes FOREVER!
Message
From
28/12/2005 16:28:51
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01081380
Message ID:
01081482
Views:
11
>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.

Actually the SQL syntax for between is

"WeekOf BETWEEN {01/01/1990} AND {12/31/2004}"


>
>
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform