how to join sc_task, task_sla and sc_req_item tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 02:49 AM
Hi,
I need to create a report of catalog task and request item SLA. I am trying to create the database view, but getting syntax error. can someone tell me how to join sc_task, task_sla and sc_req_item tables?
Thanks,
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 02:53 AM
HI Rajeev,
Why are you combining both the tables together with task_sla. You can create seperate db view for sc_task and task_sla and the other for sc_req_item and task_sla.
As task_sla will hold only 1 task at a time either sc_task or sc_req_item.
Let me know the exact requirement why you need to club all three
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 02:56 AM
Hi,
Starting at [sc_req_item], "sri"
then you have to add table: [sc_task] "st" where st_parent = sri_sys_id
And also [task_sla] "tsla" where tsla_task = st_sys_id (in the case of [task_sla] attached to [sc_task])
or where tsla_task = sri_sys_id in the case of [task_sla] is attached to [sc_req_item]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 03:00 AM
Hi Rajeev,
We had done something similar for HR Case, HR Task, Task SLA.
Database view created is as below:
Replace hr_case table with sc_req_item
task_sla remains the same
hr_task with sc_task
You can use the same variable prefix or get new ones created (your choice)
Thanks,
Jaspal Singh
Hit Like or Correct on the impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 03:07 AM