cancel
Showing results for 
Search instead for 
Did you mean: 

Linking table joins based on a condition

janet_donbavand
Explorer
0 Kudos

Is it possible to link tables with their joins based on a condition?

For example, is it possible to have a right outer join only when a particular value is X?

Thanks

Janet

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Janet, you can specify the condition base on particular value by using any of the following SQL commands as:

1. select * from employee e

    right outer join location l on e.empID = l.empID and e.particularValue = l.X;

2. select * from employee e

    right outer join location l on e.empID = l.empID

     Where e.particularValue = l.X;

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Janet,

Do you have an example of what you're trying to do please?

-Abhilash

janet_donbavand
Explorer
0 Kudos

Hi Guys

Thanks I have solved it - I was trying to do something with the Database Expert but used Add Command and a variation of the above.