Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need SQL help
Message
De
15/07/2004 05:45:33
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00924532
Message ID:
00924575
Vues:
10
Brenda

Not having done this in VFP, I'm not sure but, does this work (i.e. I'm not sure that in VFP SQL you can put an SQL select in the Update's FilterCondition)?
UPDATE Customer ;
   SET No_Mail = .T.       && First posit them all as no mail

* Then set no_mail .F. (allow mail) for the first instance of each customer
* _____________
UPDATE Customer ;
   SET No_Mail = .F.;
   WHERE Customer.Name in ( Select DISTINCT Name from Customer)
HTH
Let me know, huh (or someone shoot me down - I haven't tried this)

Terry

>I have a table that can have multiple records per customer. The customer name is not unique. If there is an exact duplicate on cust_name I do not want to send them multiple mailings. I have a field no_mail that I want to set to .T. for any duplicate cust_name.
>
>Thanks
>
>Brenda
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform