subquery in select statement?

Hi,
I search the forum and the net but does not find the right things.
I need a subquery in the select statement like the following example:


SELECT TABLE.Value,
(SELECT TABLE2.Value2 FROM TABLE2 WHERE TABLE2.Key = TABLE.Key) AS Value2
FROM TABLE

How can I do this with BO Designer or in Webi (we have BO XI 4.0)?
Is this possible with BO or do I must write it on my own in SQL?

Greetings
Martin


MTS (BOB member since 2012-04-27)

Have you tried setting this up as a dimension in your universe? If that doesn’t work, you’ll have to either add Table2 to the universe with a join to Table on the key field or create a derived table.

-Dell


hilfy :us: (BOB member since 2007-04-16)

OK I get it. I create a new Object as dimension and paste my subquery in the select field. But I must select the tables with the “Tables” button to get it working.
Thank for your help and sorry for the question :slight_smile:

Greetings
Martin


MTS (BOB member since 2012-04-27)