Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Needed To Update Records
Message
 
 
À
20/02/2013 15:14:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01566306
Message ID:
01566582
Vues:
29
>Thanks, I Used the code bit Still some records which are though exactly the same in both the tables but are not deleted in NM.
>Here is the code Which I used. I used it with Alltrim and Without Alltrim also.
>
>In NM Table Accountno is in Character and in M it is in Digits.
>
>
>
>
>Delete NM From New_Master NM inner join Master M on VAL(NM.Accountno)=M.Accountno AND ;
>ALLTRIM(NM.PhoneNo)=ALLTRIM(M.PhoneNo) and ;
>ALLTRIM(NM.Exchange)=ALLTRIM(M.Exchange) AND ALLTRIM(NM.Firstname)=ALLTRIM(M.Firstname) AND ;
>ALLTRIM(NM.Lastname)=ALLTRIM(M.LastName)
>
>
Change the above to select and see if all rows will be selected. Also, I suggest to use the other way around, e.g.
NM.AccountNo = CAST(M.AccountNo as C(10)) -- use the same type as the other table
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform