Noah J SILVA wrote:
>
> Hi,
>
> This is likely a silly question, but probably I have been
> staring at SQL
> queries for too long, and using too many database systems at once:
>
> How can I do a multi-table update?
>
> More specifically something like:
>
> UPDATE table1
> FROM table2
> SET table1.field1=table2.field1
> WHERE table1.key = table2.key
>
> I have tried all of the syntaxes I know, and none seem to be working?
>
> I even tried something like:
>
> UPDATE table1
> SET table1.field1=(SELECT field1 FROM table2 WHERE table1.key =
> table2.key)
>
I am sure, you got error -5006 Missing delimiter: = at position 25
UPDATE table1 SET table1.field1
_ that is position 25.
As the reference manual tells us
http://dev.mysql.com/doc/maxdb/en/8d/ff61682ec511d3a98100a0c9449261/frameset.htm
(and it was discussed in the mailing list more than once), that behind the
SET only a column_name, a single identifier, the name of the column; neither the
name of the owner of the table, nor the name of the table have to be specified.
Elke
SAP Labs Berlin
> The errors haven't been constructive, and the help hasn't
> been helpful. I
> didn't see any previous posts about this, and I don't remember having
> problems with it before.
>
> db version is 7.4.03.14
>
> Thank you,
> Noah Silva
> Atofina IS&T - Sr. Programmer Analyst
> (215) 419 - 7916
>
>
> --
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]