Database view of catalog items where related SCTASK there's no SLA attached

Carol2
Tera Contributor

Hi All 

 

I created a database view using the task_sla and sc_task table. Both tables have the fields that I want to report on. I am stuck on joining the tables together to get the information I am looking for. Where the related SCTASK must give me the name of the catalog item and report on whether the task SLA field is populated or not. Please help i am new to creating database views 

 

Carol2_0-1734442214128.png

 

 

Carol2_2-1734442279196.png

 

 

Carol2_1-1734442505984.png

 

 

 

24 REPLIES 24

Ankur Bawiskar
Tera Patron
Tera Patron

@Carol2 

are you saying you want to add 1 more condition to search for particular catalog item only?

if yes then do this

a) add 1 more table sc_req_item to join

sc_req_item order 300 prefix ritm where clause (ritm_sys_id = item_request_item)

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

 

The below doesn't work 

Carol2_0-1734444500130.png

Using the table added I want to see a report that has the below information. So, meaning the SCTAK number in the TASK SLA table must match the SCTASK number in the Catalog task table and give me the information below

 

Carol2_2-1734447231943.png

 

 

 

 

@Carol2 

the where clause is wrong; it should be this

ritm.sys_id=item.request_item

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

Added the "where clause" shown below no records are displayed what am I missing?

 

Carol2_0-1734502400147.png

 

Carol2_1-1734502418005.png