Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Should return rows, but not
Message
 
 
À
13/03/2006 21:00:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01104016
Message ID:
01104022
Vues:
9
You can not use DELTED function in SQL, especially if there are more than one table involved. Just put SET DELETED ON before query to filter all deleted records from all tables.

>This one is killing me. I've looked at it for a while but don't understand the results:
>
>
>select p32pur1.vendorcode, p32pur1.transno, p32pur1.vdrinvno, p32pur1.itemdesc,;
> p32pur1.aptype, p32pur1.batchno, p32vend1.vendor ;
> FROM P32Pur1 ;
> JOIN P32Vend1 ;
> ON P32Pur1.Vendorcode = P32Vend1.Vendorcode ;
> WHERE aptype = 'DC' and EMPTY(p2gl) and ! deleted() .and. at('REVERS',comment)=0 ;
> into cursor curInv READWRITE
>
>
>This "Select" is run from a button click on a form with a private data session, which calls a form with a default data session that displays the results of this query and you can select 1 for deletion.
>
>In this example, I click on the button and 3 records are returned. If I select one of records for deletion, then click the button to attempt to delete another one, the tally from the above query is 0 records. But the other 2 records not deleted should be displayed. If I click the button again, the display will look like I expect.
>
>I've verified that Ansi and Exact are what they should be.
>
>Anyone have any suggestions?
>
>Thanks,
>
>PF
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform