How to generate equivalent of the OR operator thru universe

Hello,

Here is my problem

Let’s say

the table A , field : id_toc

the table B with field id_toc and name

the table C with field id_toc and name

if i have to type the select i would have to type the following one :

select NVL( b.name, c.name)
from a, b, c
where (a.id_toc = b.id_toc) or (a.id_toc = c.id_toc)

How can i materialize this in a universe , how should i define the joins ?


boman (BOB member since 2004-07-28)

You only need to create a VIEW in your Oracle environment, as follows:

CREATE VIEW V_NAMES AS
select NVL( b.name, c.name) resolved_name
from a, b, c 
where (a.id_toc = b.id_toc) or (a.id_toc = c.id_toc) 

The name “V_NAMES” is short for “View of names”.

“RESOLVED_NAME” is the name of the result of NVL function.

So, you’ll have to insert, in B.O. Designer, only a CLASS called V_NAMES, with a unique column RESOLVED_NAME.

Oracle will do the rest! :wink:

[edited, used bbc CODE formatting - Christian, if you turned on bbc settings you will be able to format your posts, which would make it easier to read :wink: - Andreas ]


Christian Konrads :it: (BOB member since 2004-07-21)

Thanks for your help


boman (BOB member since 2004-07-28)

I hope It worked! :wink:

Isn’t?


Christian Konrads :it: (BOB member since 2004-07-21)