Left join is not working for database view

Vijay Talupula
Tera Guru
Tera Guru

Guys,

I have created a DB view for User Vs User Role table in my personal instance. I have turned on left join checkbox and it is working as expected.

But the same thing when I try in my client dev instance it is giving only matching records but not all the records. Please see the below screen shots for reference.

find_real_file.png

And it is giving 2511 records which is User role table count where as User table is having 26k+ records. I am not sure what I am missing here tough created similarly how I did in my personal dev instance.

Note: Both are Istanbul versions but personal instance is patch5 and client instance is patch3 instance. Not sure whether it is causing the issue.

1 ACCEPTED SOLUTION

Can you make these change and tell me if this is what you are looking for?



View table -> sys_user - order-100 - where-user_sys_id=role_user - Left join-True


View table -> sys_user_has_role - order-200   - Left join-True


View solution in original post

9 REPLIES 9

Can you trying making left join=false for both the view tables?


Kalai,



I have tried that but no luck. It is giving only matching records from both tables.


Can you make these change and tell me if this is what you are looking for?



View table -> sys_user - order-100 - where-user_sys_id=role_user - Left join-True


View table -> sys_user_has_role - order-200   - Left join-True


Hi Kalai,



View table -> sys_user - order-100 - where-user_sys_id=role_user - Left join-True


View table -> sys_user_has_role - order-200   - Left join-True



The above one also worked and also the below one (Just changed the order for my previous logic)   is also working.



View table -> sys_user - order-100 -   Left join-false


View table -> sys_user_has_role - order-200   - where--role_user=user_sys_id- Left join-True



Thanks much for your help. But still I didn't understand why it is working without changing the order in my personal instance :S



Regards,


Vijay


Kalaiarasan Pus
Giga Sage

Has this been answered?