-
Notifications
You must be signed in to change notification settings - Fork 1
/
MNL Members.sql
12 lines (12 loc) · 1 KB
/
MNL Members.sql
1
2
3
4
5
6
7
8
9
10
11
12
SELECT USER_SETTINGS_1.USER_ID LOC_USERS
FROM DATACENTER.LOCATION_NAMES_LIST LOCATION_NAMES_LIST
LEFT JOIN DATACENTER.NAMES_LOCATIONS_LIST NAMES_LOCATIONS_LIST ON (LOCATION_NAMES_LIST.LOCATIO_NAME_LIST_ID = NAMES_LOCATIONS_LIST.LOCATIO_NAME_LIST_ID)
LEFT JOIN DATACENTER.LOCATION_PROFILE LOCATION_PROFILE_1 ON (NAMES_LOCATIONS_LIST.NAMES_LOCATIONS_LIST_ID= LOCATION_PROFILE_1.LOCATION_PROFILE_ID)
LEFT JOIN DATACENTER.LOCATIONS_NAMES LOCATIONS_NAMES ON (LOCATION_NAMES_LIST.LOCATIO_NAME_LIST_ID = LOCATIONS_NAMES.LOCATIO_NAME_LIST_ID)
LEFT JOIN ENGINE.USER_SETTINGS USER_SETTINGS_1 ON (LOCATIONS_NAMES.LOCATIONS_NAMES_ID = USER_SETTINGS_1.USER_ID)
LEFT JOIN DATACENTER.MASTER_NAMES_LIST MASTER_NAMES_LIST ON (LOCATION_NAMES_LIST.APP_MASTER_NAMES_LIST = MASTER_NAMES_LIST.MASTER_NAMES_LIST_ID)
WHERE MASTER_NAMES_LIST.NAMES_LIST_NAME = 'MNL_DESIGN_NAME'
AND USER_SETTINGS_1.IS_DISABLED = 0
AND USER_SETTINGS_1.IS_INACTIVE = 0
AND LOCATION_PROFILE_1.DISABLED = 0
AND LOCATION_PROFILE_1.LOCATION_PROFILE_ID IN LOC_FILTER