Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL REPLACE help
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00530393
Message ID:
00531176
Views:
14
It would replace all lastnames for ssn's in curChanges with the lastname of the current record in curChanges.

>>The REPLACE is working well for me but now a new twist. I now need to produce a report of the changes. A column for old lastname and new lastname. Any ideas on how I can accomplish that?
>>
>>Brenda
>
>select table2.ssn, table1.LastName as NewName, Table2.LastName as OldName ;
> from Table1 inner join Table2 on Table1.ssn=Table2.ssn ;
>where table1.LastName<>table2.LastName into cursor curChanges
>update table2 set lastname=curChanges.NewName where ssn in (select ssn from curChanges)
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform