Merging data from two SQL tables
- FlowHeater-Team
- Topic Author
- Offline
- Admin
Less
More
14 years 2 months ago #2032
by FlowHeater-Team
Best wishes
Robert Stark
Merging data from two SQL tables - Post(2032) was created by FlowHeater-Team
Translated submission in the German forum. You can read the original entry
here
.
Hello,
Is it now possible, or will it be possible in a future version, to open two SQL database tables on the READ side at the same time and merge their data into a single stream? As a reference field, a key exists in both SQL tables.
Thanks and greetings,
Roland
Hello,
Is it now possible, or will it be possible in a future version, to open two SQL database tables on the READ side at the same time and merge their data into a single stream? As a reference field, a key exists in both SQL tables.
Thanks and greetings,
Roland
Best wishes
Robert Stark
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Topic Author
- Offline
- Admin
14 years 2 months ago #2033
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Re:Merging data from two SQL tables - Post(2033)
Hi Roland,
You can already merge two tables with the current version. You just need to amend the SQL on the READ side from
Select * from YourTable
to something like
Select table1.field1, table1.field2, table2.field1, table2.field2 from table1 inner join table2 on table1.field1 = table2.field1
Admittedly, this does require some manual entry.
If you are using MS SQL Server, you can even merge tables on two different databases in this way, provided the databases exist on the same SQL Server. To achieve this it is necessary to prefix each table name with the database name (punctuated with two dots), for example:.
database1..table1.field1 = database2..table2 .field1
Please note: The specific SQL join syntax depends on the actual database server you use.
In a later version of FlowHeater we plan to make it possible to attach several Adapters to both the READ and WRITE sides. These will provide syntax independent connection using specified fields, in a similar way to the above SQL joins.
You can already merge two tables with the current version. You just need to amend the SQL on the READ side from
Select * from YourTable
to something like
Select table1.field1, table1.field2, table2.field1, table2.field2 from table1 inner join table2 on table1.field1 = table2.field1
Admittedly, this does require some manual entry.
If you are using MS SQL Server, you can even merge tables on two different databases in this way, provided the databases exist on the same SQL Server. To achieve this it is necessary to prefix each table name with the database name (punctuated with two dots), for example:.
database1..table1.field1 = database2..table2 .field1
Please note: The specific SQL join syntax depends on the actual database server you use.
In a later version of FlowHeater we plan to make it possible to attach several Adapters to both the READ and WRITE sides. These will provide syntax independent connection using specified fields, in a similar way to the above SQL joins.
Best wishes
Robert Stark
Please Log in or Create an account to join the conversation.
Time to create page: 0.248 seconds