Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Packing SQL
Message
From
23/09/1998 16:32:25
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00140046
Message ID:
00140052
Views:
24
>I have the following SQL SELECT:
>
>
>   SELECT a.client_num, a.NAME, a.DATE, a.price, a.client_src, ;
>      b.ma_number AS ma_num, b.upin, b.dr_code AS drc, ;
>      b.drv_code AS dvc, b.pr_author AS prior_auth, .T. AS SEND ;
>      FROM ver a ;
>         LEFT OUTER JOIN clients b ON a.client_num = B.client_num ;
>      INTO ARRAY laWMA;
>      WHERE ("WMA" $ a.client_src) ;
>      AND (a.STATUS != "CXL") ;
>      AND (a.STATUS != "NS") ;
>      AND (NOT "C" $ a.meter) ;
>      AND a.verified;
>      AND NOT DELETED()
>
>
>After these are selected, they are copied into another table and deleted from the original table.
>
>This will work fine for "a while" (the number of times isn't consistant, but it's low, like 2-5), then there will be nothing in the array, even though trips that pass the WHERE are verified. If I PACK the table, it starts working again. Any ideas why this would act that way?
>
>BTW - This SELECT has been working fine for months, and just started this pattern of not working after a few runs.
>
>-Michelle

The DELETED() function is not reliable in SQL, because it reads from Current record of current alias.

Best way os to just set DELETED ON before the query.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform