Database View - Duplicate Records under Reporting

Elizabeth26
Tera Contributor

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? 

11 REPLIES 11

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

Elizabeth26
Tera Contributor

In the where clause we use childtable.parent_case= maintable.sys_id

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

Amit Gujarathi
Giga Sage
Giga Sage

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



AndersBGS
Tera Patron
Tera Patron

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/