Skip to main content



      Home
Home » Archived » 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 11:21 Go to next message
Eclipse UserFriend
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 11:44 Go to previous messageGo to next message
Eclipse UserFriend
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 13:26 Go to previous messageGo to next message
Eclipse UserFriend
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 18:08 Go to previous message
Eclipse UserFriend
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: Tue Apr 15 01:02:56 EDT 2025

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

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

Back to the top