Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0. Polzvam user TECHNO / ofa;
- 1. Problemniq segment ot WHERE klauzata e toq:
- and Person.Vo_Person_category_id in (
- select VFmxPc.VO_PERSON_CATEGORY_ID from V_FMX_PC VFmxPc
- WHERE VFmxPc.OPERATION_CENTER_ID in
- (
- select OPERATION_CENTER_ID from GUI_USERS where GUI_USER_ID = 102554
- )
- 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)
- )
- 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;
- 3. Veche imame:
- and Person.Vo_Person_category_id in (
- select VFmxPc.VO_PERSON_CATEGORY_ID from V_FMX_PC VFmxPc
- WHERE VFmxPc.OPERATION_CENTER_ID = 101804
- 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)
- 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:
- 102432
- 102437
- 102438
- 103642
- 102417
- 102440
- 103443
- 102431
- 102433
- 100655
- 102430
- 102439
- 102442 <-- VO_PERSON_CATEGORY_ID na person-a
- 103444
- 103643
- 102441
- 5. I eto i problema:
- select VFmxPc.VO_PERSON_CATEGORY_ID from V_FMX_PC VFmxPc
- WHERE VFmxPc.OPERATION_CENTER_ID = 101804 , tova vryshta slednoto
- 102432
- 102438
- 102437
- 102433
- 102439
- 102440
- 102417
- Nqma q kategoriqta na persona za toz OC
- 6. Obache kategoriqta q ima za tozi OC
- select VFmxPc.VO_PERSON_CATEGORY_ID from V_FMX_PC VFmxPc
- WHERE VFmxPc.OPERATION_CENTER_ID = 101827 + select * from operation_center
- where operation_center_id in (101827, 101804);
- Qvno tez 2 OC sa dosta blizki, zashtoto imat same contact name.
- 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