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

Ankur Bawiskar
Tera Patron
Tera Patron

@Poorva Bhawsar 

should be an easy one as you already told all 4 tables have 1 common field.

what did you start with and where are you stuck?

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

But that one field i have created separately on all the tables as these tables are custom tables. That field is a reference field from sys_user table. 

Ankur Bawiskar
Tera Patron
Tera Patron

@Poorva Bhawsar 

you will find many OOB database views which join 2/3/3 tables and having common field.

Did you check that?

AnkurBawiskar_0-1730816115226.png

 

AnkurBawiskar_1-1730816151316.png

 

 

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

Poorva Bhawsar
Mega Sage

I tried in this way but data is not populating.