Database View - Duplicate Records under Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 03:08 PM
We have a database view that's used for reporting. It ties multiple tables together. However, when you report out you get duplicate cases because each child record appears as well. Is there any way to filter out the child records from reporting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 03:37 PM
In that case, you need to add more mapping ( where clause ) for excluding some record based on condition.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 03:19 PM
In the where clause we use childtable.parent_case= maintable.sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 03:23 PM
only one condition with two tables ?
maintable.sys_id or maintable's case record sys_id
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 06:49 PM
HI @Elizabeth26 ,
I trust you are doing great.
You can use below video for refrence.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:58 PM
Hi @Elizabeth26 ,
As I understand you have created a relation between parent and child e.g. incident. If this is correct, then this is as expected when creating a database view. If you have one parent with two child incidents, then there will come two rows:
Parent --> Child 1 incident
Parent --> Child 2 incident
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/