Advertisement
psi_mmobile

Untitled

Mar 23rd, 2021
1,092
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 2.59 KB | None | 0 0
  1. SELECT * FROM operation_center WHERE LOWER(name) LIKE '%elec%';  --101715
  2. SELECT * FROM oc_poi_category WHERE operation_center_id = 101715;--101901
  3. SELECT poi_id
  4. FROM oc_poi op,
  5.   (SELECT name,
  6.     COUNT(*)
  7.   FROM oc_poi
  8.   WHERE oc_poi_category_id = 101901
  9.   GROUP BY name
  10.   HAVING COUNT(*) > 1
  11.   ) all_dup
  12. WHERE op.name = all_dup.name
  13. ORDER BY 1;
  14. SELECT DISTINCT op.poi_id
  15. FROM oc_poi op,
  16.   wbs w
  17. WHERE op.oc_poi_category_id = 101901
  18. AND w.poi_id                = op.poi_id
  19. AND w.wbs_status_id         = 0
  20. AND w.is_project            = 'Y'
  21. AND op.poi_id              IN
  22.   (SELECT poi_id
  23.   FROM oc_poi op,
  24.     (SELECT name,
  25.       COUNT(*)
  26.     FROM oc_poi
  27.     WHERE oc_poi_category_id = 101901
  28.     GROUP BY name
  29.     HAVING COUNT(*) > 1
  30.     ) all_dup
  31.   WHERE op.name = all_dup.name
  32.   )
  33. ORDER BY 1;
  34.  
  35. SELECT *
  36. FROM oc_poi
  37. WHERE poi_id IN (771313,771315,771316,771369,771371,771372,771398,771409,771412,771419,771596,771599,771620,771621,771639,771643,771656,771661,771665,771672,771681,771683,771690,771692,771745,771747,771749,771752,771754,771755,771762,771776,771785,771787,771806,771809,771845,771849,771853,771854,809845,809851,809858,809879,811426,811868,811871,811882,811885,811889,811894,812145,812438,813012,813013,813014,813015,813016,813017,813018,813019,813020,813021,813022,869787,869791,869810,869844,869847,869852,869865,869915,869916,869923,869926,869930,869938,869948,869972,869974,869983,869994,869995,869996,870005,870009,870020,870027,870044,870078,870097,870112,870151,870153,870155,870156,870169,870173,870174,870177,872214,872221,872223,872224,874988,882181,885457,885825,885826,889139,895767,896979,900143,902007,905871,908591,911779,912503,916498,916501,917139,917140,926207,927500,945124,946469,948933,949559,950207,952323,953604,957330,961463,964084,976066,976067,981844,989124,989713,989714,
  38.   990219,990796,990797,991352,991745,991746,991786,991969,991970,991971,992505,993001,993002,993003,993004,993005,993520,993521,993522,994093,994094,994095,994096,994097,994098,994554,994555,994556,994557,994850,994851,994852,994853,994854,994855,994856,995405,995406,995407,995408,995409,996008,996009,996010,996011,996012,996013,996014,996639,996640,996641,996642,996643,996644,997703,997704,997705,997706,997707,997708,997709,997710,998178,998179,998180,998181,998182,998183,998221,998222,998223,998224,998225,998226,998227,998228,998465,998467,998468,999288,999291,999292,1006428,1006429,1010138,1012608,1014499,1020493,1023039,1024522,1037155,1040386,1047710,1050198,1050200,1059963,1129120,1129124,1129137,1129153,1129160,1129416,1133546,1142366,1151488,1172859,1172860,1173600,1183687,1183688);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement