db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TXVanguard <brett.den...@lmco.com>
Subject Re: Porting to standard SQL
Date Mon, 06 Feb 2012 22:29:18 GMT



Rick Hillegas-3 wrote:
> 
>> Hope this helps,
>> -Rick
> 

Rick, thanks for all your help. The "SELECT DISTINCT" syntax seems to work.

Here's one more wrinkle I discovered:

I have several lines that look like this:

UPDATE T1 INNER JOIN T2 ON (T1.A= T2.A) SET T2.B = T1.B  WHERE (T1.C = TRUE
AND T2.C = 5)

(The only difference form my initial question is the presence of the WHERE
clause.

Is this the correct way to rewrite it (below)?

UPDATE T2 SET B = (SELECT DISTINCT(B) FROM T1 WHERE T1.a = T2.a) WHERE (T1.C
= TRUE AND T2.C >= 1)
-- 
View this message in context: http://old.nabble.com/Porting-to-standard-SQL-tp33253800p33275262.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message