Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Needed To Update Records
Message
 
 
To
20/02/2013 15:14:11
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01566306
Message ID:
01566582
Views:
28
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform