Where Clause to join 4 tables using database views

Poorva Bhawsar
Mega Sage

Hi Community,

 

I have to join 4 tables using database views. All tables have one common field that is user id which is a reference field. How can i join this. Need help with the where clause.

 

Thanks

1 ACCEPTED SOLUTION

Able to join it replaced sys_id with user_name in all the where clauses.

 

Thanks

View solution in original post

9 REPLIES 9

@Poorva Bhawsar 

so all 4 tables have same field with same type?

Are you sure you have data in those tables based on this common field.

share the database view where clause screenshots

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

Yes data is there in this common field. What i did is i have created user id field in all the 4 tables and loaded data based on that. All 4 tables extending task table.

PoorvaBhawsar_0-1730819158611.png

this is what i tried, user name is nothing but user id field. On the table i want to have user id from the ep table. But its showing me completely empty data after joining.

 

Able to join it replaced sys_id with user_name in all the where clauses.

 

Thanks

@Poorva Bhawsar 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct as well so that it benefits future readers.

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