- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 01:05 PM
I need the where clause with 2 conditions :
1- tsk_opened_at >= DATE('2017-01-01') but nothing happend.....
2- (tsk_sys_class_name ='request' || tsk_sys_class_name ='incident' || tsk_sys_class_name ='catalog task' || tsk_sys_class_name ='external customer support' )
I have tried in differents way many times without any results.
Coud someone advice me ?
Solved! Go to Solution.
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2017 06:55 AM
It seems you cant create a DB view with only one table, a workaround would be to add the task table a second time with prefix tsk2.
Then in tsk2 where clause set:
tsk_sys_id = tsk2_sys_id && tsk_opened_at > '2017-01-01 08:00:00' &&
(tsk_sys_class_name ='sc_request' ||
tsk_sys_class_name ='incident' ||
tsk_sys_class_name ='sc_task' ||
tsk_sys_class_name ='u_external_customer_support'
Also make sure you are using the table name, not the label, for example sc_request instead of Request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 01:30 PM
The below should work
tsk_inc_opened_at>='2017-01-01'
Hope this helps. Mark the answer as correct/helpful based on impact.
Thanks
Antin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 02:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 03:12 PM
Sorry, it should be
tsk_opened_at>='2017-01-01'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 01:46 PM
Hi Luis,
Try this one:
opened_at>=javascript:gs.dateGenerate('2017-01-01','00:00:00')
Here is the trick to generate perfect queries
Start by using the condition filter in the GUI for the target table and configure the exact query you need.
Execute it, test your result, and use the contextual menu (right click) on the query itself to copy it for your code.
This allowed me to generate the result above.