Need help on database view

William08
Tera Contributor

Hi all,

 

Need a help. Is there is a view to eleminate duplicate records from database view based on two columns. For example in the below screenshot we have 4 records assigned to a single user and also have same software model so is there is a way to get single record instead of 4?

 

William08_0-1713807617219.png

 

4 REPLIES 4

AshishKM
Kilo Patron
Kilo Patron

Hi @William08 ,

Can you re-checking if the main table actully has duplicate record for same users and all 4 rows are 100% identilcal.

What is the common column in both table in where clause. 

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Hi @AshishKM ,

 

1.Assigned to coulmns represent "Assigned to"  field from Software installation table.

2. On Software installation table we have a discovery model field which is refrence to Software Discovery Model table.

3. So we took the sys_id of discovery model from Software installation table and matched with the sys_id of  Software Discovery Model table. This Software Discovery Model table has field called Software model and this how we pulled that column on database 

got it and checked at my side. 

What's the main objective from this db view. why you need view. 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Hi @AshishKM 

To get the forbidden softwares of the users for auditing purpose. We can identify this forbidden software based on approval category that we have on software installation table. So is there is a way to avoid duplicates.