Allowable Database Views Where Clause Conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2013 10:36 AM
Does anyone have any detailed information on the allowed syntax when writing the where condition in database views? So far I've only been able to get =, >, >=, < and <= to work. I was wondering if additional MySQL syntax was available such as LIKE and %. I know this is mainly for joining tables, but it would be nice to have advanced filters before/after the join to reduce the size of the view results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2013 09:42 PM
The same thing I am looking for. I am not able to get the appropriate result with 'LIKE','IN''NOT IN' keyword.
Can anyone help on this?
How we can compare sys id against no. of values which have been stored under Array - In Database View?
Regards,
KS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 07:24 AM
I found this article quite useful:
ServiceNow Admin 101: Observations on Database Views, Part II - Cloud Sherpas
Especially the SOME ADDITIONAL NOTES part!
So IN can be replaced by INSTR() > 0
This helps SO much and it's SO weird that its not documented properly...
1 thing to remember using embedded MYSQL functions:
don't link your table variable prefix with a '_', but with a '.', otherwise the embed functions don't work...