SQL "Distinct" functionality in database view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2015 05:47 AM
Hello Experts,
I trying to build database view on CMDB tables. please see below screen shots.
When i am trying to do left join on last two tables, i am getting duplicate records.
Also, can you let me know how i can incoporate SQL "Distinct" Keyword functionality on any coloumn or field in database view.
Thanks,
Alessandro.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2015 08:24 AM
Hi Alessandro,
I don't think there's anything you can do specifically through the database view, but you could just group by a specific column on the view of the records. You could also do a GlideAggregate() query and use groupby from a script. I know it's not exactly what you're looking for, but it might get you closer.
Glide Record Aggregate "Distinct"
GlideAggregate - ServiceNow Wiki