Older generation SQL syntax - Oracle
-
Hi - I have having a join issue. we have report which was set up a while ago, needs to be modified. I have to add one more table, using a LEFT OUTER JOIN but using (+)! I need to left outer join table B to table A, but it is a substring. I tried which made sense syntax wise -
substr(A.source,1,4)=substr(B.OFFERNO,1,4)(+)
which did not work. Below syntax did not error out - does this look right?
substr(A.source,1,4)=substr(B.OFFERNO(+),1,4)
-
Hi - I have having a join issue. we have report which was set up a while ago, needs to be modified. I have to add one more table, using a LEFT OUTER JOIN but using (+)! I need to left outer join table B to table A, but it is a substring. I tried which made sense syntax wise -
substr(A.source,1,4)=substr(B.OFFERNO,1,4)(+)
which did not work. Below syntax did not error out - does this look right?
substr(A.source,1,4)=substr(B.OFFERNO(+),1,4)
From the Oracle language reference: The (+) operator can be applied only to a column, not to an arbitrary expression. However, an arbitrary expression can contain one or more columns marked with the (+) operator. So the second syntax looks valid to me. Does it give you the expected results?
"The ones who care enough to do it right care too much to compromise." Matthew Faithfull
-
From the Oracle language reference: The (+) operator can be applied only to a column, not to an arbitrary expression. However, an arbitrary expression can contain one or more columns marked with the (+) operator. So the second syntax looks valid to me. Does it give you the expected results?
"The ones who care enough to do it right care too much to compromise." Matthew Faithfull