Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

The database view that joins the task table and sys_email table is not working as expected.

imran rasheed
Tera Contributor

I created a database view that joins the task table and the sys_email table.

imranrasheed_0-1693396393959.png

But when I try to view, it doesn't show any records. What could be the reason?

13 REPLIES 13

Very weird. It doesn't show any data.

imranrasheed_0-1693405704174.pngimranrasheed_1-1693405726047.pngimranrasheed_2-1693405745992.pngimranrasheed_3-1693405762337.png

 

@imran rasheed are there satisfying records in your instance ? 

its very strange that data is not coming up 

@Mohith Devatte It should satisfy because we have tickets created through emails.

I tried also with what is mentioned in this KB and where clause of tsk_sys_id = eml_instance && eml_instance_table = 'incident'. Still no records shown.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0952022

Aniko Hegedus
Tera Expert

I was struggling with the same issue. In the end I think it is not possible to create a database view on the sys_email table. 

"Details

Database View on "sys_email" table is not providing the results properly

Database views cannot be created on tables that participate in table rotation. The 'sys_email' table is listed in the table rotation, hence we cannot create the Database View on 'sys_email' table.

Though you will be able to create a Database View, but the results will not be accurate."

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0958252