Advertisement
psi_mmobile

Untitled

Oct 15th, 2019
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. 0. Polzvam user TECHNO / ofa;
  2. 1. Problemniq segment ot WHERE klauzata e toq:
  3. and Person.Vo_Person_category_id in (
  4. select VFmxPc.VO_PERSON_CATEGORY_ID from V_FMX_PC VFmxPc
  5. WHERE VFmxPc.OPERATION_CENTER_ID in
  6. (
  7. select OPERATION_CENTER_ID from GUI_USERS where GUI_USER_ID = 102554
  8. )
  9. and VFmxPc.VO_PERSON_CATEGORY_ID in (select distinct VO_PERSON_CATEGORY_ID from GU_PERSON gu, PERSON p where gu.PERSON_ID = p.PERSON_ID and gu.GUI_USER_ID = 102554)
  10. )
  11. 2. Kato zamestim select OPERATION_CENTER_ID from GUI_USERS where GUI_USER_ID = 102554 -> OC na toz user e 101804 => imame VFmxPc.OPERATION_CENTER_ID = 101804 vse edno;
  12.  
  13. 3. Veche imame:
  14. and Person.Vo_Person_category_id in (
  15. select VFmxPc.VO_PERSON_CATEGORY_ID from V_FMX_PC VFmxPc
  16. WHERE VFmxPc.OPERATION_CENTER_ID = 101804
  17. and VFmxPc.VO_PERSON_CATEGORY_ID in (select distinct VO_PERSON_CATEGORY_ID from GU_PERSON gu, PERSON p where gu.PERSON_ID = p.PERSON_ID and gu.GUI_USER_ID = 102554)
  18.  
  19. 4. select distinct VO_PERSON_CATEGORY_ID from GU_PERSON gu, PERSON p where gu.PERSON_ID = p.PERSON_ID and gu.GUI_USER_ID = 102554 vryshta sledniq nabor ot IDs:
  20. 102432
  21. 102437
  22. 102438
  23. 103642
  24. 102417
  25. 102440
  26. 103443
  27. 102431
  28. 102433
  29. 100655
  30. 102430
  31. 102439
  32. 102442 <-- VO_PERSON_CATEGORY_ID na person-a
  33. 103444
  34. 103643
  35. 102441
  36.  
  37. 5. I eto i problema:
  38. select VFmxPc.VO_PERSON_CATEGORY_ID from V_FMX_PC VFmxPc
  39. WHERE VFmxPc.OPERATION_CENTER_ID = 101804 , tova vryshta slednoto
  40. 102432
  41. 102438
  42. 102437
  43. 102433
  44. 102439
  45. 102440
  46. 102417
  47. Nqma q kategoriqta na persona za toz OC
  48.  
  49. 6. Obache kategoriqta q ima za tozi OC
  50. select VFmxPc.VO_PERSON_CATEGORY_ID from V_FMX_PC VFmxPc
  51. WHERE VFmxPc.OPERATION_CENTER_ID = 101827 + select * from operation_center
  52. where operation_center_id in (101827, 101804);
  53.  
  54. Qvno tez 2 OC sa dosta blizki, zashtoto imat same contact name.
  55.  
  56. Conclusion, ako razpolagah s tochen user mojeh da znam na 100% dali tova e problema, ama si mislq, che e tova.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement