logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
RamKumar  
#1 Posted : Tuesday, June 5, 2018 5:12:20 AM(UTC)
RamKumar

Rank: Newbie

Groups: Registered
Joined: 5/31/2018(UTC)
Posts: 1
India
Location: Hyderabad

Hi,
We are able to join two tables in Seal report without using "SQL Statement"(Custom SQL query).
Is it possible to "union all" two or more tables without using any custom SQL query?

Please find the following link for screenshot.

https://drive.google.com...xRMTDD5/view?usp=sharing
epf  
#2 Posted : Tuesday, June 5, 2018 6:33:16 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 663
Switzerland

Thanks: 12 times
Was thanked: 115 time(s) in 112 post(s)
Well, SR will not handle directly the UNION of tables. You must show it as a single table.

You should either create a view doing the SELECT on all tables with an extra column indicating the source table, then create a table in your Data Source model.
Or just set the SELECT with the unions in your SQL of your table...
eric776  
#3 Posted : Tuesday, March 5, 2019 6:38:48 AM(UTC)
eric776

Rank: Newbie

Groups: Registered
Joined: 7/19/2018(UTC)
Posts: 6
China
Location: shannxi

I had the same question.You know that many enterprise databases provide users with read-only access, and only DBA can create views.
epf  
#4 Posted : Tuesday, March 5, 2019 9:40:14 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 663
Switzerland

Thanks: 12 times
Was thanked: 115 time(s) in 112 post(s)
yes you can do it like this:
Create a table in your data source, in SQL Statement, set you UNION query like:
select a from table1
union
select b from table2

Set an aliasName, and the table will be used as:

(select a from table1
union
select b from table2) aliasName

You can check it by View the SQL of your models.


Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.