Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update column in Table1 with data from Table2
Message
From
18/11/2004 07:31:37
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Oracle
Miscellaneous
Thread ID:
00962384
Message ID:
00962541
Views:
12
Mark,

Don't know about Oracle, but in SQL Server I would use the following syntax:
UPDATE Table1
SET Table1.Staff_ID = Table2.KeyID
FROM Table1 INNER JOIN Table2 ON Table1.Location = Table2.Location
or
UPDATE Table1
SET Table1.Staff_ID = Table2.KeyID
FROM Table1, Table2
WHERE Table1.Location = Table2.Location
HTH
>IN ORACLE -- Using SPT, I need to update a column in one table with data from another table, but I can not get the syntax right. Basically what I want to do is:
>
>UPDATE Table1
>SET Table1.Staff_ID = Table2.KeyID
>WHERE Table1.Location = Table2.Location
>
>The Location column in each table is unique. TIA!
Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform