Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Problem in Joined Data Set - Full Outer Join- Merge two Datasets
Problem in Joined Data Set - Full Outer Join- Merge two Datasets [message #367512] Wed, 18 March 2009 16:08 Go to next message
andreas is currently offline andreasFriend
Messages: 25
Registered: July 2009
Junior Member
Hi,
i use BIRT 2.3.1.
I have two datasets which have a matching column, say 'account'.
First dataset d1 has rows:
account Budget
ABC 1000
BCD 1500

Second Dataset d2 has rows
account expense
BCD 1200
CDE 500

If i join these two in a joined Dataset i get the following:
d1::account d1::Budget d2::account d2::expense
ABC 1000
BCD 1500 BCD 1200
CDE 500

So far, so good.
Now i tried to put a computed column to the joined dataset.
'account' with expression:
(row[d1:account] != "" ? row[d1:account] : row[d2:account])

In the Output i get accounts from d1 but nothing from d2.

If i have an extra column accountdesc in both d1 and d2 and define the
expression as:
(row[d1:account] != "" ? row[d1:account]+" "+row[d1:accountdesc] :
row[d2:account]+" "+row[d2:accountdesc])
i get it right for records from d1 and for d2 it gives "null null".
What i want to achieve is:
d1::account d1::Budget d2::account d2::expense account
ABC 1000 ABC
BCD 1500 BCD 1200 BCD
CDE 500 CDE

My original datasets are much more complex. I gave above to make it simple.

On what do i have to test for the 'empty' fields?


Andreas
Re: Problem in Joined Data Set - Full Outer Join- Merge two Datasets [message #367522 is a reply to message #367512] Thu, 19 March 2009 08:17 Go to previous messageGo to next message
andreas is currently offline andreasFriend
Messages: 25
Registered: July 2009
Junior Member
Problem solved!
Already tried with Null, but had to use null.
Sorry for the inconvenience.

Andreas
How to merge multiple datasets? [message #367545 is a reply to message #367512] Fri, 20 March 2009 08:47 Go to previous message
Colin Sutton is currently offline Colin SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
I have tables from different data sources each with identical column names.
It would be much easier for me if I could merge the datasets into one with only those same column
names.

Is there be a better way of merging datasets, rather than joining them and ending up with lots of
null entries and repeated column names.

If the tables are in the same database, the UNION operator does the job, but when there are
parameters on that dataset I end up with identical parameters for each table, which is very messy to
set up (with Oracle, where each parameter has to be manually edited).

If each table had a different dataset, then those could be merged, I'd only need to set up the
parameters on the merged dataset.

Do others have the same requirement? Should it be a feature request or is there a simple way to do this?

Colin
Previous Topic:Dealing with multiple XML datasources
Next Topic:Chart - Center
Goto Forum:
  


Current Time: Thu Apr 25 13:25:10 GMT 2024

Powered by FUDForum. Page generated in 0.03800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top