update table1 set name1 = t2.name2 from table1 t1, table2 t2 where t1.number1 = 
t2.number2

Karen

 

 

 

-----Original Message-----
From: Paul Buckley <[email protected]>
To: rbase-l <[email protected]>
Sent: Thu, Apr 21, 2016 3:34 pm
Subject: [RBASE-L] - SQL Update Question



Good afternoon,
 
I’m running the latest version of 9.5(64) and need help from the SQL gurus (my 
brain is fried). I’m trying to update a column called name1 in table1 based on 
the numeric value of column number1 in table2. For example: 
 
Table1
Number1             Name1
111                         blank
111                         blank
222                         blank
333                         blank
333                         blank
 
Table2
Number2             Name2
111                         Tom
222                         Steve
333                         Bob
 
After the update command is issued:
 
Table1
Number1             Name1
111                         Tom
111                         Tom
222                         Steve
333                         Bob
333                         Bob
 
I hope this makes sense. 
 
TIA,
Paul Buckley

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to