update join

Ivan Smahin ivan_smahin at paradigmasoft.com
Sat Mar 3 02:45:35 CST 2012


On Mar 2, 2012, at 5:58 PM, George Parkinson wrote:

> hello all,
> i'm trying to do a mass update of a field in a table with the value of a similar field from another table, based on a common id.
> 
> ie:
> UPDATE t1 
> SET t1.f1 = t2.f1 
> FROM t1 
> JOIN t2 ON t1.id = t2.id  
> 
> but this results in an error:
> Kernel error: 0x71000. line 2:7: expecting '=', found '.'
> 
> i've tried other variations but am obviously missing something (probably simple)
> anyone have a suggestion?
> 
> thanks,
> george
> 
> 

update t1 set t1.f1 = (select t2.f1 from t2 where t1.id = t2.id)


-- 
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20120303/a938e567/attachment.html>


More information about the Valentina mailing list