How to aggregate records in a database view?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-19-2018 02:50 AM
Hi,
I'm looking for some help on a database view. Basically, I have 2 custom sub tables (all extend the task table) which all reference records in another custom master table (again, extends the task table). The sub tables all have a many-to-one relationship with the master table.
I need to build an aggregated view of all of the records in the sub_tables and join these records to the master table records that they reference. Unfortunately I can't achieve this by joining the master table to the task table as each sub table has unique fields which we need in the view.
Any assistance would be greatly appreciated!
sub table 1
sub table 2
master table
desired database view

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-19-2018 04:45 PM
1) try with
master table (left join =true)
1st table 1sttable_referance = master_master_number
2nd table 2ndtable_referance = master_master_number
2) Create a DB view with master and 1st then 1st DB view and 2nd table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-22-2018 11:56 PM
Hi Deepak - thanks for your response.
Unfortunately the first method doesn't work, and I'm not able to perform the second as you're not able to reference a database view from within a database view.
Any other thoughts on this?