Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

left join

 
sangeetha krishnamurthi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the scenario for us

Table 1 has 2 primary keys columns as t1 and t2.

Table 2 has 1 primary key column as t3

we need to do left outer join where the join condition is Table 1 column t4 is compared to table 2 t3 column.

This query and tables are existing and we cannot change anything in the db side.

We are using websphere 6.1 and openJPA as JPA provider.

Please do help me to implement the left join
[ January 08, 2008: Message edited by: Bear Bibeault ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not just do the "join" in the "where" clause

where table1.t4 = table2.t3(+)

or

where (table1.t4 = table2.t3 or table1.t4 is null)

Something like that.

What database are you using?

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic