Create database view between the case, task_sla, wm_order and wm_task

ricardobraz
Tera Contributor

Hi community,

 

How can I create a database view between followings tables:

  • sn_customerservice_case
  • task_sla
  • wm_order
  • wm_task

 

The main goal is to obtain the amount of work order task where the sla case has breached.

 

Best regards.

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

You just have to figure out how each table is related to at least one other.  It looks like this will do it.  Change Left join to true and switch the Where clause left and right accordingly if you want to see every record on one of the tables - like all Work Orders, even if they don't have a Work Order Task...

BradBowman_0-1696962603243.png

 

View solution in original post

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

You just have to figure out how each table is related to at least one other.  It looks like this will do it.  Change Left join to true and switch the Where clause left and right accordingly if you want to see every record on one of the tables - like all Work Orders, even if they don't have a Work Order Task...

BradBowman_0-1696962603243.png

 

Hi Brad.

Thank you for your support.
With your solution, I was able to get not only my needs but also the understand concept of building database views.

Best regards

You are welcome!