Bob if you are updating the column in a table use the UPDATE command, I you are 
adding new data to a table, the use the INSERT command.

UPDATE tabletobeupdated SET colname =  t2.colname from tabletobeupdated t1, 
tablewithdata t2 where t1.link_column = t2.link_column

This will update the data in one table based the data in another table.where 
they have a linking column.

Gary




________________________________
From: "Castanaro, Bob" <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Fri, January 13, 2012 8:45:08 AM
Subject: [RBASE-L] - Move data from one table to another


Arrrgggg..  I lost my cheat sheet and can't find any other references.
I need to move data from one column in one table to another column in another 
table (there is a common column to link it, of course).
I know there was a cool command with a select in it but I can never get it 
right.  I thought it was an update but this scenario is not listed in the help 
files.
I have done this at the "R" prompt but also want to have a computed column do 
it 
on occasion.
Anyone remember the command structure???
 
Thanks
Bob C
 
Robert M. Castanaro 
Regional Director, Surgical Services, Clinic / Pain Services 
Summa Health System Barberton Hospital 
Summa Wadsworth Rittman Hospital
155 Fifth Street N.E. 
Barberton, Ohio  44203 
'Tele:  330-615-3627
'Cell:  330-388-7119
6Fax:   330-615-3632
¿[email protected]
 
 
 

________________________________

Note: The enclosed information is STRICTLY CONFIDENTIAL and is intended for the 
use of the addressee only. Summa Health System and its affiliates disclaim any 
responsibility for unauthorized disclosure of this information other than the 
addressee. Federal and Ohio laws protect patient medical information disclosed 
in this e-mail, including psychiatric disorders, (HIV) test results, 
AIDs-related conditions, alcohol and/or drug dependence or abuse. Federal 
regulation (42 CFR Part 2) and Ohio Revised Code section 5122.31 and 3701.243 
prohibit disclosure of this information without the specific written consent of 
the person to whom it pertains or as otherwise permitted by law.

Reply via email to