- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2016 09:48 AM
I want to improve my DB View performance by including a null test in a where clause (rather than let hundreds more records through and have to include the condition in every report I write).
Syntax for where clause doesn't SEEM to support this - neither
field != ''
nor
field = NULL
seem to work?
Has anyone managed to get a null test into a View Table Where Clause?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2016 11:20 AM
Hi Mike,
If anyone has found a way to work a null test into a database view where clause, I do not see this mentioned in the ServiceNow Community.
Adding a report on the db view has been mentioned as a workaround but you are already doing that.
The possibility of using a before query business rule is mentioned here:
http://www.snc-blog.com/2014/08/07/a-view-on-database-views/
I have not tried this, and it might or might not improve performance.
Best Regards
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2020 11:43 AM
I've created PRB1407205 in HI for this. We'll support the "ISNULL" operator starting in the Quebec release.
Maybe way too late to actually help anyone, but it'll be there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2020 11:44 AM
You'll be able to do something like:
taskslatable_task = inc_sys_id && inc_assigned_to ISNULL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2021 06:34 AM