I am working on a project to port SQL code written for Microsoft Access to
SQL code that works in JavaDB.

The following SQL statement works in Access:

UPDATE T1 INNER JOIN T2 ON (T1.A= T2.A) SET T2.B = T1.B

but when I try it in JavaDB, I get the following error:

Error code -1, SQL state 42X01: Syntax error: Encountered "INNER" at line 1,
column 12.

A coworker suggested this:

UPDATE T2 SET T2.B = T1.B  FROM T2 INNER JOIN T1 ON T1.A = T2.A 

but the FROM clause is not supported by JavaDB.

Can anyone tell me how to rewrite the first SQL statement to work in JavaDB?

Note: I'm new to SQL and am learning as quickly as I can, but I have
real-world SQL problems like the one-above that can't wait for me to become
an expert. :)


-- 
View this message in context: 
http://old.nabble.com/Porting-to-standard-SQL-tp33253800p33253800.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Reply via email to