Database view group by clause
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2016 04:58 AM
I created database view with using cmdb tables ,
I want to use gruop by cluase in Database views where clause like SQL . I think , where cluase does not support it .
How do you solve this ? script or another method ?
Regards, Thanks ,
Salih
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2016 06:27 AM
Indeed, when creating database views you can't use WHERE clause as in SQL or group by.
But, once a database view is created you can access it via:
- <databaseviewname>.list and in the list view you can use group by
- get group by in GlideAggregate scripting
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2016 07:22 AM
Thanks Sergiu ,
Where can I write this script ,
in business rule , client scripts or ?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2016 07:46 AM
What's the business case? What do you want to do with this database view?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2016 07:54 AM
When creating database view Servicenow generate Rest Api for this view,
I am using this Rest Api for someone Integration.
But I must group by some attributes on this view. I do not know where I would use GlideAggarete script for grouping .
Thanks ,