Database view error

SK5555
Tera Contributor

Even though I have created a database view using the alert and sys_email tables with a LEFT JOIN on sys_email (using email.instance = alert.sys_id in the WHERE clause), I am still not getting values from the sys_email table—only the fields from the alert table are appearing. Additionally, when I create a database view using only the sys_email table, it does not appear.


databaseview2.pngdatabaseView1.png

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@SK5555 

I won't recommend having database view on system table "sys_email"

Did you add fields under the View table?

check if this helps

Database View Left Join Help 

Left Join in creating database view 

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

Can  I know Why you won't recommend to have sys_email in database ? Any reason behind this pls ?why I am asking you  because If I used database view only on sys_email it is not working 

@SK5555 

Database view on system table is not recommended due to performance impact.

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

Note:  I am getting results on my PDI when it's comes to Dev it is not working.
I need more help, my issue has not resolved , I used left join also if you observed my screen shots will get a clarity. 
Thanks