Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT GuPerson.GUI_USER_ID,
- Person.ADMIN_LOGIN,
- Person.ADMIN_PWD,
- Person.ADMIN_RIGHT,
- Person.AGE,
- Person.BIRTH_DATE,
- Person.CAN_DRIVE_WITH_PASSENGERS,
- Person.CAN_DRIVE_WITH_PU,
- Person.COMPANY_NR,
- Person.EMAIL,
- Person.END_WORK_DATE,
- Person.FIRST_NAME,
- Person.GENDER,
- Person.HOME_POI_ID,
- Person.IS_USING_PRIVATE_CAR,
- Person.LANGUAGE,
- Person.LAST_NAME,
- Person.LAST_PERSON_DATA_ID,
- Person.LM_COMMENT,
- Person.LM_DATE,
- Person.LM_NAME,
- Person.MSISDN,
- Person.PERSON_ID,
- Person.PERSON_STATUS_ID,
- Person.PHONE,
- Person.START_WORK_DATE,
- Person.VO_PERSON_CATEGORY_ID,
- Person.WORKING_SCHEDULE_ID,
- PersonData.PERSON_DATA_ID,
- touserdate(NVL(PersonData.EVENT_DATE,TO_DATE('1970','YYYY')),OperationCenter.timezone) AS EVENT_DATE,
- TO_CHAR(touserdate(PersonData.EVENT_DATE,OperationCenter.timezone),'dd/mm/yyyy HH24:MI') AS EVENT_DATE,
- DECODE(LENGTH(TRANSLATE(TRIM(COMPANY_NR),' 0123456789',' ')), NULL, TO_NUMBER(TRIM(COMPANY_NR)), 0) AS COMPANY_NR_INT,
- UPPER(p_person.getCompanyName(Person.person_id)
- || ' '
- || VoPersonCategory.NAME
- || ' '
- || P_PERSON.list_person_group_name(Person.PERSON_ID)
- || ' '
- || Person.COMPANY_NR
- || ' '
- || Person.LAST_NAME
- || ' '
- || Person.FIRST_NAME
- || ' '
- || Person.PHONE
- || ' '
- || PersonStatus.NAME
- || ' '
- || Person.BIRTH_DATE
- || ' '
- || Person.EMAIL
- || ' '
- || Person.END_WORK_DATE
- || ' '
- || Person.GENDER
- || ' '
- || Person.MSISDN
- || ' '
- || VehicleData.rg_street_nr
- || DECODE(VehicleData.rg_street_nr,NULL,'',', ')
- || VehicleData.rg_street
- || DECODE(VehicleData.rg_street,NULL,'',' - ')
- || VehicleData.rg_post_code
- || ' '
- || VehicleData.rg_location
- || ' '
- || VehicleData.rg_country
- || ' '
- || P_PERSON.list_person_key_strings(Person.PERSON_ID)
- || ' '
- || Person.NISS
- || ' '
- || Person.LIMOSA
- || ' '
- || p_vd_poi.getPersonDataPoiName(OperationCenter.operation_center_id, PersonData.person_data_id)) AS IDSTRING,
- VoPersonCategory.VEHICLE_OWNER_ID,
- VoPersonCategory.VO_PERSON_CATEGORY_ID AS VO_PERSON_CATEGORY_ID1,
- OcPoi.WGS84_LATITUDE,
- OcPoi.POI_ID,
- OcPoi.WGS84_LONGITUDE,
- VehicleOwner.VEHICLE_OWNER_ID AS VEHICLE_OWNER_ID1,
- VoPersonCategory.NAME,
- P_PERSON.list_person_key_strings(Person.PERSON_ID) AS KEY_STRING,
- DECODE(OcPoi.Wgs84_Latitude,NULL,'N',DECODE(OcPoi.Wgs84_Longitude,NULL,'N','Y')) AS IS_GEOCODED,
- (VehicleData.rg_street_nr
- || DECODE(VehicleData.rg_street_nr,NULL,'',', ')
- || VehicleData.rg_street
- || DECODE(VehicleData.rg_street,NULL,'',' - ')
- || VehicleData.rg_post_code
- || ' '
- || VehicleData.rg_location
- || ' '
- || VehicleData.rg_country) AS VEHICLE_DATA_RG_ADRESS,
- p_vd_poi.getPersonDataPoiName(OperationCenter.operation_center_id, PersonData.person_data_id) AS POI_NAME,
- p_vd_poi.getPersonDataPoiId(OperationCenter.operation_center_id, PersonData.PERSON_DATA_ID) AS POI_ID_LIST,
- P_PERSON.list_person_group_name(Person.PERSON_ID) AS PERSON_GROUP,
- (Person.LAST_NAME
- ||' '
- ||Person.FIRST_NAME) AS FULLNAME,
- VoPersonCategory.GRAPHICAL_SYMBOL,
- (OcPoi.street_nr
- || DECODE(OcPoi.street_nr,NULL,'',', ')
- || OcPoi.street
- || DECODE(OcPoi.street,NULL,'',' - ')
- || OcPoi.post_code
- || ' '
- || OcPoi.location
- || ' '
- || OcPoi.country) AS VIEW_ATTR,
- Person.VEHICLE_PRIVATE_USE_ALLOWED,
- GuiUsers.GUI_USER_ID AS GUI_USER_ID1,
- OperationCenter.OPERATION_CENTER_ID,
- PersonStatus.PERSON_STATUS_ID AS PERSON_STATUS_ID1,
- VehicleData.VEHICLE_DATA_ID,
- Person.NISS,
- Person.LIMOSA,
- GuPerson.PERSON_ID AS PERSON_ID1,
- p_person.getCompanyName(Person.person_id) AS VIEW_ATTR,
- Person.PERSON_MFRAME_STATUS_ID,
- PersonMframeStatus.GRAPHICAL_SYMBOL AS GRAPHICAL_SYMBOL1,
- PersonMframeStatus.NAME AS NAME1,
- PersonMframeStatus.PERSON_MFRAME_STATUS_ID AS PERSON_MFRAME_STATUS_ID1,
- Str.STR_VALUE,
- Str.STR_ID,
- Str.LANGUAGE AS LANGUAGE1,
- P_PERSON.getPlannedWBS(Person.PERSON_ID) AS VIEW_ATTR,
- Person.IS_WORK_TIME_REPORTED,
- GuPerson.CAW_LIMITED
- FROM GU_PERSON GuPerson,
- PERSON Person,
- PERSON_DATA PersonData,
- GUI_USERS GuiUsers,
- OPERATION_CENTER OperationCenter,
- VO_PERSON_CATEGORY VoPersonCategory,
- PERSON_STATUS PersonStatus,
- OC_POI OcPoi,
- VEHICLE_OWNER VehicleOwner,
- VEHICLE_DATA VehicleData,
- OF_OWNER.PERSON_MFRAME_STATUS PersonMframeStatus,
- OF_OWNER.STR Str
- WHERE GuiUsers.GUI_USER_ID = 101694
- AND GuiUsers.GUI_USER_ID = GuPerson.GUI_USER_ID
- AND GuiUsers.OPERATION_CENTER_ID = OperationCenter.OPERATION_CENTER_ID
- AND GuPerson.PERSON_ID = Person.PERSON_ID
- AND Person.VO_PERSON_CATEGORY_ID = VoPersonCategory.VO_PERSON_CATEGORY_ID
- AND VoPersonCategory.VEHICLE_OWNER_ID = VehicleOwner.VEHICLE_OWNER_ID
- AND Person.PERSON_STATUS_ID = PersonStatus.PERSON_STATUS_ID
- AND Person.HOME_POI_ID = OcPoi.POI_ID(+)
- AND PersonData.PERSON_DATA_ID(+) = Person.LAST_PERSON_DATA_ID
- AND VehicleData.VEHICLE_DATA_ID(+) = PersonData.VEHICLE_DATA_ID
- AND
- (
- (
- '1' = '-1'
- OR '101550,' IS NULL
- OR '101550,' = ''
- OR Person.VO_PERSON_CATEGORY_ID IN
- (
- SELECT regexp_substr('101550,','[^,]+', 1, LEVEL)
- FROM dual
- CONNECT BY regexp_substr('101550,', '[^,]+', 1, LEVEL) IS NOT NULL
- )
- )
- OR (
- NVL(GuPerson.CAW_LIMITED,'N') = DECODE('Y','N','NIGGA','Y')
- )
- )
- AND (Person.PERSON_STATUS_ID =0
- OR 'true' ='true')
- AND Person.PERSON_MFRAME_STATUS_ID = PersonMframeStatus.PERSON_MFRAME_STATUS_ID(+)
- AND PersonMframeStatus.STR_ID = Str.STR_ID (+)
- AND GuiUsers.LANGUAGE = Str.LANGUAGE (+)
- ORDER BY FIRST_NAME, LAST_NAME;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement