Rank: Newbie
Groups: Registered
Joined: 5/31/2018(UTC) Posts: 1 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
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 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...
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/19/2018(UTC) Posts: 6 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.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 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.
|
|
|
|
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.