Sven K�hler  wrote:

> if i want a simple data transfer of one table into another 
> i'd like to 
> use something like
> 
> UPDATE t1 LEFT JOIN t2 SET t1.c1 = t2.c2
> 
> but that is not allowed in SAPDB. Is there any workaround?
> 

I do not really understand what this SQL should do.
But according to the mails going back and forth you want to UPDATE
some columns with the corresponding values taken from another table,
not changing all columns (therefore no insert is what you like).
But how is this expressed in your SQL above? There is no expression
given to find out the 'corresponding' values/row.
therefore my answer may not help. But what about this:

For a 'normal (not LEFT) join there is the workaround:
UPDATE T1 SET C1 = (SELECT C2 FROM T2 WHERE t2.col2 = t1.col1)

for left join (avoiding t1-values to be changed where there is no correspondong value)
UPDATE T1 SET C1 = (SELECT C2 FROM T2 WHERE  t2.col2 = t1.col1)
WHERE EXISTS (SELECT 1 FROM T2 WHERE  t2.col2 = t1.col1) 

I do not say that it is really fast for big tables as correlated subqueries are a hard 
job
internally. But they may help.

Elke
SAP Labs Berlin

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to