Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question Join in Oracle Database

  • fxh
  • fxh's Avatar Topic Author
22 May 2019 16:30 #1 by fxh
fxh created the topic: Join in Oracle Database
I've got an issue when I use the join possibilities.

The generated code is

select DISTINCT
F41001.CIAN8 L1_CIAN8
from ((FINDTA.F41001 F41001
INNER JOIN FINDTA.F0006 F0006
ON F41001.CIMCU = F0006.MCMCU)
RIGHT OUTER JOIN FINDTA.F03012 F03012
ON F41001.CIAN8 = F03012.AIAN8)
LEFT OUTER JOIN FINDTA.F00092 F00092
ON F03012.AIAN8 =F00092.T3SBN1
and F03012.AICO =F00092.T3KCO
where (1=1) AND (F00092.T3SDB = 'CLI') AND (F00092.T3TYDT = 'IT')

This request only return 1 line

When I delete WHERE (1=1) the new sql

select DISTINCT
F41001.CIAN8 L1_CIAN8
from ((FINDTA.F41001 F41001
INNER JOIN FINDTA.F0006 F0006
ON F41001.CIMCU = F0006.MCMCU)
RIGHT OUTER JOIN FINDTA.F03012 F03012
ON F41001.CIAN8 = F03012.AIAN8)
LEFT OUTER JOIN FINDTA.F00092 F00092
ON F03012.AIAN8 =F00092.T3SBN1
and F03012.AICO =F00092.T3KCO AND (F00092.T3SDB = 'CLI') AND (F00092.T3TYDT = 'IT')

works perfectly

My question is : How to remove the WHERE condition.....
More
24 May 2019 13:58 #2 by Thomas BLETON
Thomas BLETON replied the topic: Join in Oracle Database
Hi,

I suppose that the expression "(F00092.T3SDB = 'CLI') AND (F00092.T3TYDT = 'IT')" is set in a Filter, in the mapping ?
Filter expressions are generated in a where clause.
If you want them to appear in the JOIN clause, then place this expression in the Join expression.
Please provide more details if this does not help :) (screenshot of the mapping and of each Join / Filter expression).