27.01.2013, 22:18 | #1 |
Участник
|
Two datasources, two grids
Hi,
I have two tables: t1 (main table), t2 (related table). I should show on form only t1 and t2 records, where for t1 related t2 records exist, Normaly I could use InnerJoin, but I have two grids: t1, t2. I tried: 1. InnerJoin shows the same count of resords for t1, how much records exists for t2. 2. OuterJoin return all t1 records, even related records not exist in t2 3. ExistJoin return correct redords for t1, but records without values for t2. Is here some solution? |
|
28.01.2013, 02:26 | #2 |
Участник
|
You need Delayed (the default type of join) between t1 and t2
Additionally you will need to adjust the t1 query (e.g. in the t1 datasource init method, look for examples in standard forms) in the code and add "Exist t2" condition that you need. p.s. consider changing the design, it looks kinda wrong - this type of joins should never came up in normal developments. Последний раз редактировалось lvan; 28.01.2013 в 02:30. |
|
28.01.2013, 12:15 | #3 |
Участник
|
Цитата:
Сообщение от lvan
You need Delayed (the default type of join) between t1 and t2
Additionally you will need to adjust the t1 query (e.g. in the t1 datasource init method, look for examples in standard forms) in the code and add "Exist t2" condition that you need. p.s. consider changing the design, it looks kinda wrong - this type of joins should never came up in normal developments. |
|