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 20:36:09 GMT

Rick Hillegas-3 wrote:
> The Access update could change the target row twice. No one will notice 
> if both matching rows from T1 have the same value in column B. Or...not 
> many people will notice if the rows from the join always come back in 
> the same order so that the same value of B always wins. It might be 
> useful to run the join outside the update and see what it returns on 
> Access and Derby.

I ran the INNER JOINs in both Access and Derby as you suggested. Both seem
to return the same result. 

Column T2.A is the primary key, so every value is unique. Column T1.A has
many rows that have the same value as each other, but each value that occurs
in T1.A matches one of the values in T2.A.

It appears that whenever T1.A has many rows that share the same value, the
value in T1.B is always the same. (Maybe this is indicative of suboptimal

Could I rewrite my original SQL statement in the way suggested by Bryan
Pendleton-3, but modify it somehow to use only the "first" value of T1.B?

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

View raw message