Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT vd_poi_day.invoiced_line,
- vd_poi_day_id,
- vd_poi_day.date_day,
- vd_poi_day.vehicle_id,
- gu_vehicle.gui_user_id,
- vehicle.vehicle_owner_id,
- TO_CHAR(vd_poi_day.date_day,'DD/MM/YYYY') WORK_DATE,
- NULL WORKER_CODE,
- NULL ALLOWANCE,
- NULL HR,
- NULL MOB_CODE,
- NULL KM,
- NULL ADDRESS,
- vd_poi_day.ref_number PROJECT,
- NULL WORKER_ACTIVITY,
- NULL LEGAL_CATEGORY,
- NULL LEGAL_CODE,
- vehicle.company_nr MATERIAL_CODE,
- TRIM(TO_CHAR(ROUND(vd_poi_day.poi_hr*10)/10, '90.9')) MATERIAL_HR,
- '***********' MATERIAL_ACTIVITY,
- NULL LEGAL_CATEGORY2,
- NULL LEGAL_CODE2
- FROM vd_poi_day,
- vehicle,
- oc_day_aggreg,
- gu_vehicle,
- gui_users
- WHERE vd_poi_day.vehicle_id = vehicle.vehicle_id
- AND vd_poi_day.oc_day_aggreg_id = oc_day_aggreg.oc_day_aggreg_id
- AND ( (oc_day_aggreg.operation_center_id=101229) -- Eiffage-Sodemat
- OR (oc_day_aggreg.operation_center_id=101738 AND oc_day_aggreg.vo_vehicle_category_id=102966 ) -- TRAGECO Engin
- OR (oc_day_aggreg.operation_center_id=101129 AND oc_day_aggreg.vo_vehicle_category_id=102969 ) -- GEHLEN Engin
- OR (oc_day_aggreg.operation_center_id=101176 AND oc_day_aggreg.vo_vehicle_category_id=102537 ) -- DEFLANDRE Engin
- )
- AND vehicle.vehicle_id = gu_vehicle.vehicle_id
- AND gu_vehicle.gui_user_id = gui_users.GUI_USER_ID
- AND gui_users.operation_center_id = oc_day_aggreg.operation_center_id
- -- and nvl(vd_poi_day.invoiced_line,'Y') <> 'N'
- AND vd_poi_day.day_first_start_km IS NOT NULL
- AND date_day BETWEEN SYSDATE - 7 AND SYSDATE
- AND gui_users.gui_user_id=101060
- ORDER BY vehicle.company_nr, vd_poi_day.date_day;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement