Advertisement
psi_mmobile

Untitled

Jun 23rd, 2020
1,582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 1.72 KB | None | 0 0
  1.   SELECT vd_poi_day.invoiced_line,
  2.   vd_poi_day_id,
  3.     vd_poi_day.date_day,
  4.     vd_poi_day.vehicle_id,
  5.     gu_vehicle.gui_user_id,
  6.     vehicle.vehicle_owner_id,
  7.     TO_CHAR(vd_poi_day.date_day,'DD/MM/YYYY') WORK_DATE,
  8.     NULL WORKER_CODE,
  9.     NULL ALLOWANCE,
  10.     NULL HR,
  11.     NULL MOB_CODE,
  12.     NULL KM,
  13.     NULL ADDRESS,
  14.     vd_poi_day.ref_number PROJECT,
  15.     NULL WORKER_ACTIVITY,
  16.     NULL LEGAL_CATEGORY,
  17.     NULL LEGAL_CODE,
  18.     vehicle.company_nr MATERIAL_CODE,
  19.     TRIM(TO_CHAR(ROUND(vd_poi_day.poi_hr*10)/10, '90.9')) MATERIAL_HR,
  20.     '***********' MATERIAL_ACTIVITY,
  21.     NULL LEGAL_CATEGORY2,
  22.     NULL LEGAL_CODE2
  23.   FROM vd_poi_day,
  24.     vehicle,
  25.     oc_day_aggreg,
  26.     gu_vehicle,
  27.     gui_users
  28.   WHERE vd_poi_day.vehicle_id         = vehicle.vehicle_id
  29.   AND vd_poi_day.oc_day_aggreg_id     = oc_day_aggreg.oc_day_aggreg_id
  30.   AND ( (oc_day_aggreg.operation_center_id=101229)                                                  -- Eiffage-Sodemat
  31.      OR (oc_day_aggreg.operation_center_id=101738 AND oc_day_aggreg.vo_vehicle_category_id=102966 ) -- TRAGECO Engin
  32.      OR (oc_day_aggreg.operation_center_id=101129 AND oc_day_aggreg.vo_vehicle_category_id=102969 ) -- GEHLEN Engin  
  33.      OR (oc_day_aggreg.operation_center_id=101176 AND oc_day_aggreg.vo_vehicle_category_id=102537 ) -- DEFLANDRE Engin  
  34.       )  
  35.   AND vehicle.vehicle_id = gu_vehicle.vehicle_id
  36.   AND gu_vehicle.gui_user_id = gui_users.GUI_USER_ID
  37.   AND gui_users.operation_center_id = oc_day_aggreg.operation_center_id
  38. --  and nvl(vd_poi_day.invoiced_line,'Y') <> 'N'
  39.   AND vd_poi_day.day_first_start_km IS NOT NULL
  40.   AND date_day BETWEEN SYSDATE - 7 AND SYSDATE
  41.   AND gui_users.gui_user_id=101060
  42.   ORDER BY vehicle.company_nr, vd_poi_day.date_day;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement