Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Theta - Joints Problems

Status
Not open for further replies.

Benouche

Programmer
Aug 6, 2002
48
FR
Hello !
I try to join table A to table B:
The data in the A field(Fa) should be equal to the data in one of two fields (F1, F2) in B.

I have been trying to built a theta-joint and to write the right expression in Joint Editor :
- (Fa=F1) OR (Fa=F2)
- Fa between F1 AND F2

It didn't succeed, always getting a SQL Error while Reporting ....

Any help is warmly welcome !
Benouche
 
I don't think you can achieve both of your join conditions as decribed

- (Fa=F1) OR (Fa=F2)
- Fa between F1 AND F2

Your first statement "- (Fa=F1) OR (Fa=F2)" is not SQL so that is why you get the error. On its own your second statement should work "- Fa between F1 AND F2 "

if one of the fields (e.g. F1) is more likely to be the join to Fa and the other one frequently empty, you could try this

nvl(F2,F1) = Fa




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top