Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to: SQL update statement
Message
From
19/09/2002 15:45:01
 
 
To
19/09/2002 10:58:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00702283
Message ID:
00702432
Views:
17
Jim,

Try the following:
REPLACE ALL Table1.MyColumn WITH LOOKUP(Table2.myMatchedColumn, Table1.KeyId, Table2.KeyId)
HTH
>Hi all,
>
>any one know how to do something like this:
>
>
>UPDATE table1 set mycolumn = table2.mymatchedcolumn ;
>WHERE (table1.keyid == table2.keyid )
>
>
>Where keyid is a foreign key into table2 from table1. I am using INDEXSEEK(), with lMovePointer turned on, to do similar things now, but it makes me slightly uncomfortable. :)
>
>
>UPDATE table1 set mycolumn = table2.mymatchedcolumn;
>WHERE INDEXSEEK(table1.keyid,.T.,"table2")
>
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform