Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete query
Message
De
02/08/2001 18:38:58
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00539028
Message ID:
00539136
Vues:
11
Bharat,

My guess here is that is is running alright, as follows:

Assume that in the current record of claims02 claims02.line has "662" and claims02.claim_num has "123456-78".

This would then DELETE any/all records in claim_detail where claim_detail.line = "662" and claim_detail.claim_num = "123456-78".

In other words, the values in the CURRENT record of claims02 are used for the whole run through the whole of the claim_detail table.

You want to play around with a sub-select, along the lines of:
DELETE FROM claim_detail ;
    WHERE claim_detail.line + claim_detail.claim_num  ;
         IN (SELECT C2.line + C2.claim_num  ;
                 FROM claims02 C2  ;
                 WHERE C2.Line = claim_detail.Line  ;
                      AND C2.claim_num = claim_detail.claim_num)
Not saying this is it but saying something along these lines is your only real chance USING DELETE-SQL. I use xBase commands for my deleting.

good luck,

JimN


>Hi
>
>I used the following command
>
>delete from claim_detail where;
>claim_detail.line = claims02.line and;
>claim_detail.claim_num = claims02.claim_num
>
> Here I am using two tables but not where clause. This query seems to do something and when I give "pack" command . It doesnot delete anything.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform