Hello
How to simply perform a sql operation of union of 2 different database tables ? (not a join)
thanks
Hello
How to simply perform a sql operation of union of 2 different database tables ? (not a join)
thanks
Hi @jerome,
Two easy ways of doing so in FME:
1) Use the SQLCreator transformer to do the Union using SQL in the database
2) Read both tables and lead the output to the first transformer or writer. If you need a UNION and not UNION ALL, you will need to filter out the duplicates by using the DuplicateFilter transformer.
Hope this helps.
Thanks... I tried the first solution but it failed because I could not write the correct table 's name from different database. And for the second one I obtain too much different column attribut...
I try again
InlineQuerier: works for me. Union Statement.
I've found that dropping schema prefixes sometimes helps with naming-if possible. So for instance dbo.tableX may not work in some transformers but if you change it at the reader level to come in as tableX it works fine.
InlineQuerier: works for me. Union Statement.
I've found that dropping schema prefixes sometimes helps with naming-if possible. So for instance dbo.tableX may not work in some transformers but if you change it at the reader level to come in as tableX it works fine.
this transformer seems to be dedicated to SQLite database tables.
Do you know a documentation dedicated to multi database access ?
InlineQuerier: works for me. Union Statement.
I've found that dropping schema prefixes sometimes helps with naming-if possible. So for instance dbo.tableX may not work in some transformers but if you change it at the reader level to come in as tableX it works fine.
It may use SQLite syntax but you can use it with a variety of result sets. I have used it with Oracle, MSSQL, CSV and Excel result sets. Feed your results into the InlineQuerier the create the statement.
In the eaxmple below I use a MSSQL DB and join a spreadsheet with 'union all':
It may use SQLite syntax but you can use it with a variety of result sets. I have used it with Oracle, MSSQL, CSV and Excel result sets. Feed your results into the InlineQuerier the create the statement.
In the eaxmple below I use a MSSQL DB and join a spreadsheet with 'union all':
Thanks it's just what I want ... but I'm surprised there is no native way to do the sql union operation
@jerome