Home » SQL & PL/SQL » SQL & PL/SQL » using SUBSTR function in an outer join?
using SUBSTR function in an outer join? [message #19827] Thu, 11 April 2002 08:01 Go to next message
bechir
Messages: 23
Registered: November 2001
Junior Member
How to 'outer' a join that includes a SUBSTR function. For example, in T1.col1 = SUBSTR(T2.col1, 1, 4) Where should I put the (+) sign
T1.col1 = SUBSTR(T2.col1, 1, 4) (+) or
T1.col1 = SUBSTR(T2.col1(+), 1, 4)
Re: using SUBSTR function in an outer join? [message #19829 is a reply to message #19827] Thu, 11 April 2002 10:02 Go to previous messageGo to next message
uma
Messages: 67
Registered: May 2001
Member
T1.COL1=SUBSTR(T2.COL1(+),1,4) should work.

Tks,

Uma
Re: using SUBSTR function in an outer join? [message #19855 is a reply to message #19827] Sat, 13 April 2002 16:27 Go to previous messageGo to next message
Su
Messages: 154
Registered: April 2002
Senior Member
I dont think the outer join (+) symbol works with an expression. Try with an alias. That is, do alias the expression in SELECT column list and use the same alias name in the outer join expression.

Just like

SELECT COL1, COL2, SUBSTR(COL3,1,2) COLX FROM MYTABLE WHERE COL1 = COLX(+);

Try it out. Guess it works.

Good luck :)
Re: using SUBSTR function in an outer join? [message #20682 is a reply to message #19827] Thu, 13 June 2002 11:00 Go to previous message
JRick
Messages: 1
Registered: June 2002
Junior Member
Thank you so much for your response! It really works!
Previous Topic: Conditional Insert / Join Question
Next Topic: FISCAL YEAR date format
Goto Forum:
  


Current Time: Thu Mar 28 04:14:24 CDT 2024