Database view with two tables with no relationship

MARISA INACIO1
Tera Contributor

Hi everyone

 

I need to create a database view with this wto tables 

sn_test_management_test

rm_defect

 

there are no relationship between them, however I create a reference field on rm_defect to sn_test_management_test but still don't work.

 

MARISAINACIO1_0-1747217952517.png

Can you help me please?

 

 

Thanks in advance

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@MARISA INACIO1 

use this, use the correct field name for the bold

defect_u_teste = test_sys_id

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

@MARISA INACIO1 

Hope you are doing good.

Did my reply answer your question?

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

shantanu_patel8
Mega Guru

Hi @MARISA INACIO1 ,

 

The "." doesn't work when you are declaring the where clause in database views. Instead of '"." you need to use "_" so you can replace "defect.u_teste = test.sys_id" with "defect_u_teste = test_sys_id" and it should serve the purpose.

 

Mark the answer as correct and helpful if it resolves your issue. Happy Scripting 🙂

 

-Shantanu

 

Hi @MARISA INACIO1 ,

 

I hope the issue is resolved or are you stuck somewhere?

 

-Shantanu