Subject Re: [firebird-support] Update with data FROM a table
Author Ümit KANOĞLU
Hello,

It maybe like this :

update TABLE T1
set FIELD1 = (select T2.FIELD1 from TABLE2 T2 where T2.ID = T1.ID)
,FIELD2 = (select T2.FIELD2 from TABLE2 T2 where T2.ID = T1.ID)


--
Umit
www.kanoglu.web.tr

m_formigoni wrote:

>Hello again,
>
>I'm trying to do an update in a table using data from another table,
>like this:
>
>update TABLE
> set FIELD1 = T2.FIELD1,
> FIELD2 = T2.FIELD2
> from TABLE2 T2
> where TABLE.ID = T2.ID
>
>It raises the following error: "Invalid token FROM".
>
>Once more: I used to do this in Sybase...
>
>Does anybody knows how can I do this without declaring variables?
>
>Thanks.
>
>
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://firebird.sourceforge.net and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>