Hi all,
I’m trying to convert an existing project from a relational database.
I’m hoping I can get some help constructing a query that’s fairly straightforward in SQL...
In this scenario there are 3 tables:
- table 1 has a list of dates
- table 2 has encounter data that includes a foreign key for person and links to table 1 by date (table1.date = table2.date)
- table 3 has person data and links to table 2 with personID (table2.personID = table3.personID)
So basically selecting a date in from table 1 should retrieve all encounters in table 2 with the same date and in each retrieved result, the personID foreign key should retrieve person data from table 3 when presenting the data.
in SQL i’d just use a SELECT with JOIN statements to retrieve this in one go.
Is this feasible with liveCloud? Or would i need to construct an array running 2 separate queries?
Alternatively, should the data structure change to include all person data in the encounter table for example?
grateful for any pointers/suggestions...
I’m trying to convert an existing project from a relational database.
I’m hoping I can get some help constructing a query that’s fairly straightforward in SQL...
In this scenario there are 3 tables:
- table 1 has a list of dates
- table 2 has encounter data that includes a foreign key for person and links to table 1 by date (table1.date = table2.date)
- table 3 has person data and links to table 2 with personID (table2.personID = table3.personID)
So basically selecting a date in from table 1 should retrieve all encounters in table 2 with the same date and in each retrieved result, the personID foreign key should retrieve person data from table 3 when presenting the data.
in SQL i’d just use a SELECT with JOIN statements to retrieve this in one go.
Is this feasible with liveCloud? Or would i need to construct an array running 2 separate queries?
Alternatively, should the data structure change to include all person data in the encounter table for example?
grateful for any pointers/suggestions...