Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » UNION of 2 data sets or 2 values for a Parameter
UNION of 2 data sets or 2 values for a Parameter [message #1787392] Thu, 24 May 2018 15:21 Go to next message
Cesar Sasaki is currently offline Cesar SasakiFriend
Messages: 5
Registered: March 2018
Junior Member
Hi
I'm trying to create a UNION of 2 data sets both are same structure. Or create a data set that I can put 2 values on "Parameter", because using parameter value seems much faster than filter. (I'm I correct here?)


I know I can create an outer join and merge columns in computed columns but it is not very efficient because I want to UNION more than 4 data sets.

I have read something about scripted data sets , how do they work?

Thanks
Re: UNION of 2 data sets or 2 values for a Parameter [message #1787393 is a reply to message #1787392] Thu, 24 May 2018 15:44 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

You need to be more clear about what you're trying to do. Are you trying to mix the results of two data sets or four data sets? A UNION is very different from an outer join. Perhaps you can describe your data sources, the columns of each set, and what you're trying to obtain as a result.

After that, we can discuss how to best use parameters in your query.
Re: UNION of 2 data sets or 2 values for a Parameter [message #1787398 is a reply to message #1787393] Thu, 24 May 2018 17:26 Go to previous messageGo to next message
Cesar Sasaki is currently offline Cesar SasakiFriend
Messages: 5
Registered: March 2018
Junior Member
Hi Richard

Thanks for the reply.
I have 2 (or more) data set with columns like :

ID | Name | Date 1 | Date 2 |String 1 | String 2 |

And I want to create a Union between those so I can use only 1 data set for all the data.

My example with the outer Join was to for example Have something like

ID_A | Name_A | Date 1_A | Date 2_A |String 1_A | String 2_A | ID_B | Name_B | Date 1_B | Date 2_B |String 1_B | String 2_B |
and create new computed columns like "IF ID_A is null THEN ID_B ELSE ID_A".

Re: UNION of 2 data sets or 2 values for a Parameter [message #1787408 is a reply to message #1787398] Thu, 24 May 2018 22:08 Go to previous message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

In order for you to have a join between the data sets, there has to be a common column and value they share. It sounds like you want to use a UNION query, which will resemble:

Select ID, Name, Date1, Date2, String1, String2 from Table1
UNION ALL
Select ID, Name, Date1, Date2, String1, String2 from Table2
UNION ALL
Select ID, Name, Date1, Date2, String1, String2 from Table3

Unless the Name value appears in all of your data sets - is that the case?
Previous Topic:Dynamic report output filename
Next Topic:org.eclipse.help.contexts
Goto Forum:
  


Current Time: Fri Nov 16 06:03:53 GMT 2018

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

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

Back to the top