Дано
База 1С:Управление холдингом, редакция 3.1 (3.1.14.15)
В базе создан пользователь 1, которому присвоена роль «Налоговый мониторинг», база открывается более 5 минут.
У других пользователей база открывается в разы быстрее: около 30 секунд.
СУБД: PostgreSQL 12.7.
Задача
Необходимо оптимизировать запуск под пользователем 1.
Замер производительности
Серверная отладка включена, работает. В замере производительности суммарное время показывает около 30 секунд, то есть основное время (причина) отсутствует в замере — да, к сожалению, такое бывает, на практике встречалось много раз.
RLS
RLS в роли "Налоговый мониторинг" есть только к справочнику "Банковские счета".
С отключенным RLS запуск такой же медленный.
Тестовая база
Тестовая база развернута на СУБД MSSQL Server.
На СУБД MSSQL Server запуск прерывается с другой ошибкой: «Обработчик запросов исчерпал внутренние ресурсы, и ему не удалось предоставить план запроса. Это редкое событие, которое может происходить только при очень сложных запросах, которые обращаются к очень большому числу таблиц или секций. Упростите запрос.»
Ошибка на MSSQL может быть связана с одинаковым одним и тем же источником, а может и с другим и по другой причине, поэтому для экономии времени и для точности придется прибегнуть к анализу технологического журнала (ТЖ).
Анализ ТЖ
1) Настроен сбор следующей настройкой
<?xml version="1.0"?>
<config xmlns="http://v8.1c.ru/v8/tech-log">
<dump location="F:\Logs1C\dumps" create="0" type="3"/>
<log location="F:\Logs1C\EXCP" history="2">
<event>
<eq property="name" value="EXCP"/>
</event>
<event>
<eq property="name" value="EXCPCNTX"/>
</event>
<property name="all"/>
</log>
<log location="F:\Logs1C\DBPOSTGRS" history="2">
<event>
<eq property="name" value="DBPOSTGRS"/>
</event>
<property name="all"/>
</log>
<log location="F:\Logs1C\CALL" history="2">
<event>
<eq property="name" value="CALL"/>
</event>
<property name="all"/>
</log>
</config>
2) Воспроизведен медленный запуск базы.
3) Выведены топовые вызовы:
- "Топ CPU вызовов";
- "Топ суммарно длительных вызовов";
- "Топ длительных вызовов";
- "Топ пиков потребления памяти";
- "Топ запросов с временем".
Во всех топах прослеживается один совпадающий вызов, на который следует обратить особое внимание:
4946315;; CpuTime (sec): 4.94632;; CpuTime (min): 0.0824386;; Time: 18:39;; Duration (sec): 417.499;; Duration(min): 6.95832;; User: Usr=Пользователь1(Налоговый инспектор);; Base=base1,OSThread=2372 :: Context=Система.ПолучитьФорму : Обработка.НалоговыйМониторинг.Форма.РегламентированнаяОтчетность; Обработка.НалоговыйМониторинг.Форма.ЗапросыУточняющихДокументов; Обработка.НалоговыйМониторинг.Форма.СсылкиДляНалоговогоИнспектора,
417499009, :: 417.499 sec :: 6.95832 min :: Base=base1 :: Context=Система.ПолучитьФорму : Обработка.НалоговыйМониторинг.Форма.РегламентированнаяОтчетность; Обработка.НалоговыйМониторинг.Форма.ЗапросыУточняющихДокументов; Обработка.НалоговыйМониторинг.Форма.СсылкиДляНалоговогоИнспектора,
18:40:39 : 417499009 : 417.499 sec : 6.95832 min : Usr=Пользователь1(Налоговый инспектор) : Base=base1,OSThread=2372 :: Context=Система.ПолучитьФорму : Обработка.НалоговыйМониторинг.Форма.РегламентированнаяОтчетность; Обработка.НалоговыйМониторинг.Форма.ЗапросыУточняющихДокументов; Обработка.НалоговыйМониторинг.Форма.СсылкиДляНалоговогоИнспектора,
266849141 bytes :: 417.499 sec :: Usr=Пользователь1(Налоговый инспектор) :: Base=base1,OSThread=2372 :: Context=Система.ПолучитьФорму : Обработка.НалоговыйМониторинг.Форма.РегламентированнаяОтчетность; Обработка.НалоговыйМониторинг.Форма.ЗапросыУточняющихДокументов; Обработка.НалоговыйМониторинг.Форма.СсылкиДляНалоговогоИнспектора,
Время=40:39.454000; Длительность=412.077 sec;,RowsAffected=45,Result=PGRES_TUPLES_OK,Context=Система.ПолучитьФорму : Обработка.НалоговыйМониторинг.Форма.РегламентированнаяОтчетность; Обработка.НалоговыйМониторинг.Форма.ЗапросыУточняющихДокументов; Обработка.НалоговыйМониторинг.Форма.СсылкиДляНалоговогоИнспектора
Итак, в 18:40:39 завершился вызов, который занял объем памяти 266849141 bytes.
266849141 bytes = 254 Мб потребления памяти за один клиент-серверный вызов - это значительно много, такой объем приводит к ожиданию, по сути мы ждем скачивание данных.
Так как "Топ запросов с временем" показал длительность 412 секунд = 6 минут 52 секунды, то основное ожидание происходит из-за запроса на СУБД PostgreSQL.
Запрос, действительно большой и сложный, в запросе присутствуют слова SDBL_DUMMY, SDBL_DUAL, означающие использование RLS.
Время=40:39.454000; Длительность=412.077 sec;,RowsAffected=45,Result=PGRES_TUPLES_OK,Context=Система.ПолучитьФорму : Обработка.НалоговыйМониторинг.Форма.РегламентированнаяОтчетность; Обработка.НалоговыйМониторинг.Форма.ЗапросыУточняющихДокументов; Обработка.НалоговыйМониторинг.Форма.СсылкиДляНалоговогоИнспектора
SELECT
T1._Fld22706_TYPE,
T1._Fld22706_RTRef,
T1._Fld22706_RRRef,
T1._Fld22713,
T1._Fld22705RRef,
T1._Fld22707,
T1._Fld22718,
T1._Fld22708,
T1._Fld22723,
CASE WHEN (T1._Fld22716RRef = \\222i\\361\\376U\\025\\353\\260GKk\\215\\213\\336Z\\022::bytea) OR (T1._Fld22716RRef = \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) THEN 0001-01-01 00:00:00::timestamp ELSE T1._Fld33469 END
FROM _InfoRg22704 T1
LEFT OUTER JOIN (SELECT
T3._Marked AS Marked_,
T3._IDRRef AS IDRRef,
T3._Fld37769_TYPE AS Fld37769_TYPE,
T3._Fld37769_RTRef AS Fld37769_RTRef,
T3._Fld37769_RRRef AS Fld37769_RRRef,
T3._Fld1194 AS Fld1194_
FROM _Reference37382 T3
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T4
ON (T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea AND T3._Fld37769_RRRef = T4._IDRRef) AND (T4._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference159 T5
ON ((CASE WHEN T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea THEN T4._Fld4110RRef ELSE CAST(NULL AS BYTEA) END <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) AND ((CASE WHEN T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea THEN T4._Fld4110RRef ELSE CAST(NULL AS BYTEA) END = T5._Fld4110RRef) OR (CASE WHEN T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea THEN T4._Fld4110RRef ELSE CAST(NULL AS BYTEA) END = T5._IDRRef)) OR (T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea AND T3._Fld37769_RRRef = T5._Fld4110RRef)) AND (T5._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T6
INNER JOIN _Reference79 T7
ON (T6._Fld2999 = Справочник.ТранспортныеСредства::mvarchar) AND EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg26432 T8
WHERE ((T8._Fld1194 = CAST(0 AS NUMERIC))) AND ((T8._Fld26433_TYPE = \\010::bytea AND T8._Fld26433_RTRef = \\000\\000\\000j::bytea AND T8._Fld26433_RRRef = T6._IDRRef) AND (T8._Fld26434RRef = T7._IDRRef))) AND T7._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T7._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT (((T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea)))) OR (T3._Fld37769_TYPE = \\010::bytea) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T12
WHERE ((T12._Fld1194 = CAST(0 AS NUMERIC))) AND ((T12._Fld22973RRef = T7._IDRRef) AND (T12._Fld22974_TYPE = T3._Fld37769_TYPE AND T12._Fld22974_RTRef = T3._Fld37769_RTRef AND T12._Fld22974_RRRef = T3._Fld37769_RRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T13
WHERE ((T13._Fld1194 = CAST(0 AS NUMERIC))) AND ((T13._Fld22980RRef = T7._IDRRef) AND T13._Fld22981_TYPE = T3._Fld37769_TYPE AND T13._Fld22981_RTRef = T3._Fld37769_RTRef AND (T13._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((CASE WHEN T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea THEN T4._Fld4110RRef ELSE CAST(NULL AS BYTEA) END IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T14
WHERE ((T14._Fld1194 = CAST(0 AS NUMERIC))) AND ((T14._Fld22973RRef = T7._IDRRef) AND (T14._Fld22974_TYPE = \\010::bytea AND T14._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T14._Fld22974_RRRef = CASE WHEN T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea THEN T4._Fld4110RRef ELSE CAST(NULL AS BYTEA) END))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T15
WHERE ((T15._Fld1194 = CAST(0 AS NUMERIC))) AND ((T15._Fld22980RRef = T7._IDRRef) AND T15._Fld22981_TYPE = CASE WHEN CASE WHEN T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea THEN T4._Fld4110RRef ELSE CAST(NULL AS BYTEA) END IS NOT NULL THEN \\010::bytea END AND T15._Fld22981_RTRef = CASE WHEN CASE WHEN T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea THEN T4._Fld4110RRef ELSE CAST(NULL AS BYTEA) END IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T15._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (CASE WHEN T3._Fld37769_TYPE = \\010::bytea AND T3._Fld37769_RTRef = \\000\\000\\000\\237::bytea THEN T4._Fld4110RRef ELSE CAST(NULL AS BYTEA) END <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR ((T5._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg22972 T16
WHERE ((T16._Fld1194 = CAST(0 AS NUMERIC))) AND ((T16._Fld22973RRef = T7._IDRRef) AND (T16._Fld22974_TYPE = \\010::bytea AND T16._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T16._Fld22974_RRRef = T5._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _InfoRg22979 T17
WHERE ((T17._Fld1194 = CAST(0 AS NUMERIC))) AND ((T17._Fld22980RRef = T7._IDRRef) AND T17._Fld22981_TYPE = CASE WHEN T5._IDRRef IS NOT NULL THEN \\010::bytea END AND T17._Fld22981_RTRef = CASE WHEN T5._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T17._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T3._Fld1194 = CAST(0 AS NUMERIC))) T2
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\006::bytea AND T1._Fld22706_RRRef = T2.IDRRef
LEFT OUTER JOIN _Reference273 T18
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\021::bytea AND T1._Fld22706_RRRef = T18._IDRRef) AND (T18._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document45545 T19
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\351::bytea AND T1._Fld22706_RRRef = T19._IDRRef) AND (T19._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T21._Marked AS Marked_,
T21._IDRRef AS IDRRef,
T21._Fld14130RRef AS Fld14130RRef,
T21._Fld1194 AS Fld1194_
FROM _Document476 T21
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T22
INNER JOIN _Reference79 T23
ON (T22._Fld2999 = Документ.ОтчетПроизводстваЗаСмену::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T24
WHERE ((T24._Fld1194 = CAST(0 AS NUMERIC))) AND ((T24._Fld26433_TYPE = \\010::bytea AND T24._Fld26433_RTRef = \\000\\000\\000j::bytea AND T24._Fld26433_RRRef = T22._IDRRef) AND (T24._Fld26434RRef = T23._IDRRef))) AND T23._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T23._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T27
WHERE ((T27._Fld1194 = CAST(0 AS NUMERIC))) AND ((T27._Fld22973RRef = T23._IDRRef) AND (T27._Fld22974_TYPE = \\010::bytea AND T27._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T27._Fld22974_RRRef = T21._Fld14130RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T28
WHERE ((T28._Fld1194 = CAST(0 AS NUMERIC))) AND ((T28._Fld22980RRef = T23._IDRRef) AND T28._Fld22981_TYPE = \\010::bytea AND T28._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T28._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T21._Fld1194 = CAST(0 AS NUMERIC))) T20
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\334::bytea AND T1._Fld22706_RRRef = T20.IDRRef
LEFT OUTER JOIN _Reference262 T29
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\006::bytea AND T1._Fld22706_RRRef = T29._IDRRef) AND (T29._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference284 T30
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\034::bytea AND T1._Fld22706_RRRef = T30._IDRRef) AND (T30._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T32._Marked AS Marked_,
T32._IDRRef AS IDRRef,
T32._Fld20616RRef AS Fld20616RRef,
T32._Fld1194 AS Fld1194_
FROM _Document625 T32
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T33
INNER JOIN _Reference79 T34
ON (T33._Fld2999 = Документ.ФормированиеЗаписейКнигиПокупок::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T35
WHERE ((T35._Fld1194 = CAST(0 AS NUMERIC))) AND ((T35._Fld26433_TYPE = \\010::bytea AND T35._Fld26433_RTRef = \\000\\000\\000j::bytea AND T35._Fld26433_RRRef = T33._IDRRef) AND (T35._Fld26434RRef = T34._IDRRef))) AND T34._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T34._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T38
WHERE ((T38._Fld1194 = CAST(0 AS NUMERIC))) AND ((T38._Fld22973RRef = T34._IDRRef) AND (T38._Fld22974_TYPE = \\010::bytea AND T38._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T38._Fld22974_RRRef = T32._Fld20616RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T39
WHERE ((T39._Fld1194 = CAST(0 AS NUMERIC))) AND ((T39._Fld22980RRef = T34._IDRRef) AND T39._Fld22981_TYPE = \\010::bytea AND T39._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T39._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T32._Fld1194 = CAST(0 AS NUMERIC))) T31
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002q::bytea AND T1._Fld22706_RRRef = T31.IDRRef
LEFT OUTER JOIN (SELECT
T41._Marked AS Marked_,
T41._IDRRef AS IDRRef,
T41._Fld17637RRef AS Fld17637RRef,
T41._Fld1194 AS Fld1194_
FROM _Document553 T41
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T42
INNER JOIN _Reference79 T43
ON (T42._Fld2999 = Документ.СписаниеОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T44
WHERE ((T44._Fld1194 = CAST(0 AS NUMERIC))) AND ((T44._Fld26433_TYPE = \\010::bytea AND T44._Fld26433_RTRef = \\000\\000\\000j::bytea AND T44._Fld26433_RRRef = T42._IDRRef) AND (T44._Fld26434RRef = T43._IDRRef))) AND T43._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T43._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T47
WHERE ((T47._Fld1194 = CAST(0 AS NUMERIC))) AND ((T47._Fld22973RRef = T43._IDRRef) AND (T47._Fld22974_TYPE = \\010::bytea AND T47._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T47._Fld22974_RRRef = T41._Fld17637RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T48
WHERE ((T48._Fld1194 = CAST(0 AS NUMERIC))) AND ((T48._Fld22980RRef = T43._IDRRef) AND T48._Fld22981_TYPE = \\010::bytea AND T48._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T48._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T41._Fld1194 = CAST(0 AS NUMERIC))) T40
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002)::bytea AND T1._Fld22706_RRRef = T40.IDRRef
LEFT OUTER JOIN (SELECT
T50._Marked AS Marked_,
T50._IDRRef AS IDRRef,
T50._Fld1194 AS Fld1194_,
T50._Fld10758RRef AS Fld10758RRef
FROM _Document398 T50
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T51
INNER JOIN _Reference79 T52
ON (T51._Fld2999 = Документ.ВыгрузкаРегламентированныхОтчетов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T53
WHERE ((T53._Fld1194 = CAST(0 AS NUMERIC))) AND ((T53._Fld26433_TYPE = \\010::bytea AND T53._Fld26433_RTRef = \\000\\000\\000j::bytea AND T53._Fld26433_RRRef = T51._IDRRef) AND (T53._Fld26434RRef = T52._IDRRef))) AND T52._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T52._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T56
WHERE ((T56._Fld1194 = CAST(0 AS NUMERIC))) AND ((T56._Fld22973RRef = T52._IDRRef) AND (T56._Fld22974_TYPE = \\010::bytea AND T56._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T56._Fld22974_RRRef = T50._Fld10758RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T57
WHERE ((T57._Fld1194 = CAST(0 AS NUMERIC))) AND ((T57._Fld22980RRef = T52._IDRRef) AND T57._Fld22981_TYPE = \\010::bytea AND T57._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T57._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T50._Fld1194 = CAST(0 AS NUMERIC))) T49
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\216::bytea AND T1._Fld22706_RRRef = T49.IDRRef
LEFT OUTER JOIN (SELECT
T59._Marked AS Marked_,
T59._IDRRef AS IDRRef,
T59._Fld13605RRef AS Fld13605RRef,
T59._Fld1194 AS Fld1194_
FROM _Document468 T59
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T60
INNER JOIN _Reference79 T61
ON (T60._Fld2999 = Документ.ОтражениеЗарплатыВБухучете::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T62
WHERE ((T62._Fld1194 = CAST(0 AS NUMERIC))) AND ((T62._Fld26433_TYPE = \\010::bytea AND T62._Fld26433_RTRef = \\000\\000\\000j::bytea AND T62._Fld26433_RRRef = T60._IDRRef) AND (T62._Fld26434RRef = T61._IDRRef))) AND T61._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T61._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document468_VT13671 T65
WHERE ((T65._Fld1194 = CAST(0 AS NUMERIC))) AND ((T59._IDRRef = T65._Document468_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T66
WHERE ((T66._Fld1194 = CAST(0 AS NUMERIC))) AND ((T66._Fld22973RRef = T61._IDRRef) AND (T66._Fld22974_TYPE = \\010::bytea AND T66._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T66._Fld22974_RRRef = T59._Fld13605RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T67
WHERE ((T67._Fld1194 = CAST(0 AS NUMERIC))) AND ((T67._Fld22980RRef = T61._IDRRef) AND T67._Fld22981_TYPE = \\010::bytea AND T67._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T67._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T59._Fld1194 = CAST(0 AS NUMERIC))) T58
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\324::bytea AND T1._Fld22706_RRRef = T58.IDRRef
LEFT OUTER JOIN _Reference37380 T68
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\004::bytea AND T1._Fld22706_RRRef = T68._IDRRef) AND (T68._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T70._Marked AS Marked_,
T70._IDRRef AS IDRRef,
T70._Fld15401RRef AS Fld15401RRef,
T70._Fld1194 AS Fld1194_
FROM _Document511 T70
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T71
INNER JOIN _Reference79 T72
ON (T71._Fld2999 = Документ.ПодтверждениеОткрытияЛицевыхСчетовСотрудников::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T73
WHERE ((T73._Fld1194 = CAST(0 AS NUMERIC))) AND ((T73._Fld26433_TYPE = \\010::bytea AND T73._Fld26433_RTRef = \\000\\000\\000j::bytea AND T73._Fld26433_RRRef = T71._IDRRef) AND (T73._Fld26434RRef = T72._IDRRef))) AND T72._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T72._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document511_VT15409 T76
WHERE ((T76._Fld1194 = CAST(0 AS NUMERIC))) AND ((T70._IDRRef = T76._Document511_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T77
WHERE ((T77._Fld1194 = CAST(0 AS NUMERIC))) AND ((T77._Fld22973RRef = T72._IDRRef) AND (T77._Fld22974_TYPE = \\010::bytea AND T77._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T77._Fld22974_RRRef = T70._Fld15401RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T78
WHERE ((T78._Fld1194 = CAST(0 AS NUMERIC))) AND ((T78._Fld22980RRef = T72._IDRRef) AND T78._Fld22981_TYPE = \\010::bytea AND T78._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T78._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T70._Fld1194 = CAST(0 AS NUMERIC))) T69
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\377::bytea AND T1._Fld22706_RRRef = T69.IDRRef
LEFT OUTER JOIN (SELECT
T80._Marked AS Marked_,
T80._IDRRef AS IDRRef,
T80._Fld17655RRef AS Fld17655RRef,
T80._Fld1194 AS Fld1194_
FROM _Document554 T80
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T81
INNER JOIN _Reference79 T82
ON (T81._Fld2999 = Документ.СписаниеСРасчетногоСчета::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T83
WHERE ((T83._Fld1194 = CAST(0 AS NUMERIC))) AND ((T83._Fld26433_TYPE = \\010::bytea AND T83._Fld26433_RTRef = \\000\\000\\000j::bytea AND T83._Fld26433_RRRef = T81._IDRRef) AND (T83._Fld26434RRef = T82._IDRRef))) AND T82._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T82._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T86
WHERE ((T86._Fld1194 = CAST(0 AS NUMERIC))) AND ((T86._Fld22973RRef = T82._IDRRef) AND (T86._Fld22974_TYPE = \\010::bytea AND T86._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T86._Fld22974_RRRef = T80._Fld17655RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T87
WHERE ((T87._Fld1194 = CAST(0 AS NUMERIC))) AND ((T87._Fld22980RRef = T82._IDRRef) AND T87._Fld22981_TYPE = \\010::bytea AND T87._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T87._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T80._Fld1194 = CAST(0 AS NUMERIC))) T79
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002*::bytea AND T1._Fld22706_RRRef = T79.IDRRef
LEFT OUTER JOIN (SELECT
T89._Marked AS Marked_,
T89._IDRRef AS IDRRef,
T89._Fld13357RRef AS Fld13357RRef,
T89._Fld1194 AS Fld1194_
FROM _Document460 T89
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T90
INNER JOIN _Reference79 T91
ON (T90._Fld2999 = Документ.ОписьЗаявленийСотрудниковНаВыплатуПособий::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T92
WHERE ((T92._Fld1194 = CAST(0 AS NUMERIC))) AND ((T92._Fld26433_TYPE = \\010::bytea AND T92._Fld26433_RTRef = \\000\\000\\000j::bytea AND T92._Fld26433_RRRef = T90._IDRRef) AND (T92._Fld26434RRef = T91._IDRRef))) AND T91._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T91._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document460_VT13376 T95
WHERE ((T95._Fld1194 = CAST(0 AS NUMERIC))) AND ((T89._IDRRef = T95._Document460_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T96
WHERE ((T96._Fld1194 = CAST(0 AS NUMERIC))) AND ((T96._Fld22973RRef = T91._IDRRef) AND (T96._Fld22974_TYPE = \\010::bytea AND T96._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T96._Fld22974_RRRef = T89._Fld13357RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T97
WHERE ((T97._Fld1194 = CAST(0 AS NUMERIC))) AND ((T97._Fld22980RRef = T91._IDRRef) AND T97._Fld22981_TYPE = \\010::bytea AND T97._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T97._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T89._Fld1194 = CAST(0 AS NUMERIC))) T88
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\314::bytea AND T1._Fld22706_RRRef = T88.IDRRef
LEFT OUTER JOIN (SELECT
T99._Marked AS Marked_,
T99._IDRRef AS IDRRef,
T99._Fld18703RRef AS Fld18703RRef,
T99._Fld1194 AS Fld1194_
FROM _Document569 T99
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T100
INNER JOIN _Reference79 T101
ON (T100._Fld2999 = Документ.УведомлениеОбИмпортеМаркированныхТоваровГИСМ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T102
WHERE ((T102._Fld1194 = CAST(0 AS NUMERIC))) AND ((T102._Fld26433_TYPE = \\010::bytea AND T102._Fld26433_RTRef = \\000\\000\\000j::bytea AND T102._Fld26433_RRRef = T100._IDRRef) AND (T102._Fld26434RRef = T101._IDRRef))) AND T101._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T101._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T105
WHERE ((T105._Fld1194 = CAST(0 AS NUMERIC))) AND ((T105._Fld22973RRef = T101._IDRRef) AND (T105._Fld22974_TYPE = \\010::bytea AND T105._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T105._Fld22974_RRRef = T99._Fld18703RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T106
WHERE ((T106._Fld1194 = CAST(0 AS NUMERIC))) AND ((T106._Fld22980RRef = T101._IDRRef) AND T106._Fld22981_TYPE = \\010::bytea AND T106._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T106._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T99._Fld1194 = CAST(0 AS NUMERIC))) T98
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0029::bytea AND T1._Fld22706_RRRef = T98.IDRRef
LEFT OUTER JOIN _Reference258 T107
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\002::bytea AND T1._Fld22706_RRRef = T107._IDRRef) AND (T107._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T109._Marked AS Marked_,
T109._IDRRef AS IDRRef,
T109._Fld4245RRef AS Fld4245RRef,
T109._Fld1194 AS Fld1194_
FROM _Reference160 T109
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T110
ON ((T109._Fld4245RRef = T110._IDRRef)) AND (T110._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference159 T111
ON ((T110._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) AND ((T110._Fld4110RRef = T111._Fld4110RRef) OR (T110._Fld4110RRef = T111._IDRRef)) OR ((T109._Fld4245RRef = T111._Fld4110RRef) OR (T109._Fld4245RRef = T111._IDRRef))) AND (T111._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference159 T112
ON (T109._Fld4245RRef = T112._IDRRef) AND (T112._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T113
INNER JOIN _Reference79 T114
ON (T113._Fld2999 = Справочник.ОрганизацииПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg26432 T115
WHERE ((T115._Fld1194 = CAST(0 AS NUMERIC))) AND ((T115._Fld26433_TYPE = \\010::bytea AND T115._Fld26433_RTRef = \\000\\000\\000j::bytea AND T115._Fld26433_RRRef = T113._IDRRef) AND (T115._Fld26434RRef = T114._IDRRef))) AND T114._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T114._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T118
WHERE ((T118._Fld1194 = CAST(0 AS NUMERIC))) AND ((T118._Fld22973RRef = T114._IDRRef) AND (T118._Fld22974_TYPE = \\010::bytea AND T118._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T118._Fld22974_RRRef = T109._Fld4245RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T119
WHERE ((T119._Fld1194 = CAST(0 AS NUMERIC))) AND ((T119._Fld22980RRef = T114._IDRRef) AND T119._Fld22981_TYPE = \\010::bytea AND T119._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T119._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((T112._Fld4110RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T120
WHERE ((T120._Fld1194 = CAST(0 AS NUMERIC))) AND ((T120._Fld22973RRef = T114._IDRRef) AND (T120._Fld22974_TYPE = \\010::bytea AND T120._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T120._Fld22974_RRRef = T112._Fld4110RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T121
WHERE ((T121._Fld1194 = CAST(0 AS NUMERIC))) AND ((T121._Fld22980RRef = T114._IDRRef) AND T121._Fld22981_TYPE = CASE WHEN T112._Fld4110RRef IS NOT NULL THEN \\010::bytea END AND T121._Fld22981_RTRef = CASE WHEN T112._Fld4110RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T121._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (T112._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR ((T111._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg22972 T122
WHERE ((T122._Fld1194 = CAST(0 AS NUMERIC))) AND ((T122._Fld22973RRef = T114._IDRRef) AND (T122._Fld22974_TYPE = \\010::bytea AND T122._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T122._Fld22974_RRRef = T111._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _InfoRg22979 T123
WHERE ((T123._Fld1194 = CAST(0 AS NUMERIC))) AND ((T123._Fld22980RRef = T114._IDRRef) AND T123._Fld22981_TYPE = CASE WHEN T111._IDRRef IS NOT NULL THEN \\010::bytea END AND T123._Fld22981_RTRef = CASE WHEN T111._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T123._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T109._Fld1194 = CAST(0 AS NUMERIC))) T108
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\240::bytea AND T1._Fld22706_RRRef = T108.IDRRef
LEFT OUTER JOIN _Reference122 T124
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000z::bytea AND T1._Fld22706_RRRef = T124._IDRRef) AND (T124._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T126._Marked AS Marked_,
T126._IDRRef AS IDRRef,
T126._Fld17306RRef AS Fld17306RRef,
T126._Fld1194 AS Fld1194_
FROM _Document544 T126
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T127
INNER JOIN _Reference79 T128
ON (T127._Fld2999 = Документ.СведенияОЗаработкеСтажеЗастрахованныхЛицСЗВ_ИСХ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T129
WHERE ((T129._Fld1194 = CAST(0 AS NUMERIC))) AND ((T129._Fld26433_TYPE = \\010::bytea AND T129._Fld26433_RTRef = \\000\\000\\000j::bytea AND T129._Fld26433_RRRef = T127._IDRRef) AND (T129._Fld26434RRef = T128._IDRRef))) AND T128._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T128._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document544_VT17377 T132
WHERE ((T132._Fld1194 = CAST(0 AS NUMERIC))) AND ((T126._IDRRef = T132._Document544_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T133
WHERE ((T133._Fld1194 = CAST(0 AS NUMERIC))) AND ((T133._Fld22973RRef = T128._IDRRef) AND (T133._Fld22974_TYPE = \\010::bytea AND T133._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T133._Fld22974_RRRef = T126._Fld17306RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T134
WHERE ((T134._Fld1194 = CAST(0 AS NUMERIC))) AND ((T134._Fld22980RRef = T128._IDRRef) AND T134._Fld22981_TYPE = \\010::bytea AND T134._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T134._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T126._Fld1194 = CAST(0 AS NUMERIC))) T125
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002 ::bytea AND T1._Fld22706_RRRef = T125.IDRRef
LEFT OUTER JOIN _Reference30906 T135
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\272::bytea AND T1._Fld22706_RRRef = T135._IDRRef) AND (T135._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T137._Marked AS Marked_,
T137._IDRRef AS IDRRef,
T137._Fld44407RRef AS Fld44407RRef,
T137._Fld1194 AS Fld1194_
FROM _Document44385 T137
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T138
INNER JOIN _Reference79 T139
ON (T138._Fld2999 = Документ.УведомлениеОбОстаткахПрослеживаемыхТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T140
WHERE ((T140._Fld1194 = CAST(0 AS NUMERIC))) AND ((T140._Fld26433_TYPE = \\010::bytea AND T140._Fld26433_RTRef = \\000\\000\\000j::bytea AND T140._Fld26433_RRRef = T138._IDRRef) AND (T140._Fld26434RRef = T139._IDRRef))) AND T139._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T139._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T143
WHERE ((T143._Fld1194 = CAST(0 AS NUMERIC))) AND ((T143._Fld22973RRef = T139._IDRRef) AND (T143._Fld22974_TYPE = \\010::bytea AND T143._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T143._Fld22974_RRRef = T137._Fld44407RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T144
WHERE ((T144._Fld1194 = CAST(0 AS NUMERIC))) AND ((T144._Fld22980RRef = T139._IDRRef) AND T144._Fld22981_TYPE = \\010::bytea AND T144._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T144._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T137._Fld1194 = CAST(0 AS NUMERIC))) T136
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255a::bytea AND T1._Fld22706_RRRef = T136.IDRRef
LEFT OUTER JOIN _Reference211 T145
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\323::bytea AND T1._Fld22706_RRRef = T145._IDRRef
LEFT OUTER JOIN _Reference129 T146
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\201::bytea AND T1._Fld22706_RRRef = T146._IDRRef) AND (T146._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T148._Marked AS Marked_,
T148._IDRRef AS IDRRef,
T148._Fld38573RRef AS Fld38573RRef,
T148._Fld1194 AS Fld1194_
FROM _Document38485 T148
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T149
INNER JOIN _Reference79 T150
ON (T149._Fld2999 = Документ.АктОРасхожденияхПолученный::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T151
WHERE ((T151._Fld1194 = CAST(0 AS NUMERIC))) AND ((T151._Fld26433_TYPE = \\010::bytea AND T151._Fld26433_RTRef = \\000\\000\\000j::bytea AND T151._Fld26433_RRRef = T149._IDRRef) AND (T151._Fld26434RRef = T150._IDRRef))) AND T150._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T150._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T154
WHERE ((T154._Fld1194 = CAST(0 AS NUMERIC))) AND ((T154._Fld22973RRef = T150._IDRRef) AND (T154._Fld22974_TYPE = \\010::bytea AND T154._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T154._Fld22974_RRRef = T148._Fld38573RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T155
WHERE ((T155._Fld1194 = CAST(0 AS NUMERIC))) AND ((T155._Fld22980RRef = T150._IDRRef) AND T155._Fld22981_TYPE = \\010::bytea AND T155._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T155._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T148._Fld1194 = CAST(0 AS NUMERIC))) T147
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\226U::bytea AND T1._Fld22706_RRRef = T147.IDRRef
LEFT OUTER JOIN _Reference45299 T156
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\363::bytea AND T1._Fld22706_RRRef = T156._IDRRef) AND (T156._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T158._Marked AS Marked_,
T158._IDRRef AS IDRRef,
T158._Fld6017RRef AS Fld6017RRef,
T158._Fld1194 AS Fld1194_
FROM _Reference221 T158
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T159
ON (T158._Fld6017RRef = T159._IDRRef) AND (T159._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference159 T160
ON ((T159._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) AND ((T159._Fld4110RRef = T160._Fld4110RRef) OR (T159._Fld4110RRef = T160._IDRRef)) OR (T158._Fld6017RRef = T160._Fld4110RRef)) AND (T160._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T161
INNER JOIN _Reference79 T162
ON (T161._Fld2999 = Справочник.ПравилаРегулярныхПлатежей::mvarchar) AND EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg26432 T163
WHERE ((T163._Fld1194 = CAST(0 AS NUMERIC))) AND ((T163._Fld26433_TYPE = \\010::bytea AND T163._Fld26433_RTRef = \\000\\000\\000j::bytea AND T163._Fld26433_RRRef = T161._IDRRef) AND (T163._Fld26434RRef = T162._IDRRef))) AND T162._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T162._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT (((\\000\\000\\000\\237::bytea = \\000\\000\\000\\237::bytea)))) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T166
WHERE ((T166._Fld1194 = CAST(0 AS NUMERIC))) AND ((T166._Fld22973RRef = T162._IDRRef) AND (T166._Fld22974_TYPE = \\010::bytea AND T166._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T166._Fld22974_RRRef = T158._Fld6017RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T167
WHERE ((T167._Fld1194 = CAST(0 AS NUMERIC))) AND ((T167._Fld22980RRef = T162._IDRRef) AND T167._Fld22981_TYPE = \\010::bytea AND T167._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T167._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((T159._Fld4110RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T168
WHERE ((T168._Fld1194 = CAST(0 AS NUMERIC))) AND ((T168._Fld22973RRef = T162._IDRRef) AND (T168._Fld22974_TYPE = \\010::bytea AND T168._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T168._Fld22974_RRRef = T159._Fld4110RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T169
WHERE ((T169._Fld1194 = CAST(0 AS NUMERIC))) AND ((T169._Fld22980RRef = T162._IDRRef) AND T169._Fld22981_TYPE = CASE WHEN T159._Fld4110RRef IS NOT NULL THEN \\010::bytea END AND T169._Fld22981_RTRef = CASE WHEN T159._Fld4110RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T169._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (T159._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR ((T160._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg22972 T170
WHERE ((T170._Fld1194 = CAST(0 AS NUMERIC))) AND ((T170._Fld22973RRef = T162._IDRRef) AND (T170._Fld22974_TYPE = \\010::bytea AND T170._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T170._Fld22974_RRRef = T160._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _InfoRg22979 T171
WHERE ((T171._Fld1194 = CAST(0 AS NUMERIC))) AND ((T171._Fld22980RRef = T162._IDRRef) AND T171._Fld22981_TYPE = CASE WHEN T160._IDRRef IS NOT NULL THEN \\010::bytea END AND T171._Fld22981_RTRef = CASE WHEN T160._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T171._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T158._Fld1194 = CAST(0 AS NUMERIC))) T157
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\335::bytea AND T1._Fld22706_RRRef = T157.IDRRef
LEFT OUTER JOIN (SELECT
T173._Marked AS Marked_,
T173._IDRRef AS IDRRef,
T173._Fld14966RRef AS Fld14966RRef,
T173._Fld1194 AS Fld1194_
FROM _Document497 T173
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T174
INNER JOIN _Reference79 T175
ON (T174._Fld2999 = Документ.ПередачаОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T176
WHERE ((T176._Fld1194 = CAST(0 AS NUMERIC))) AND ((T176._Fld26433_TYPE = \\010::bytea AND T176._Fld26433_RTRef = \\000\\000\\000j::bytea AND T176._Fld26433_RRRef = T174._IDRRef) AND (T176._Fld26434RRef = T175._IDRRef))) AND T175._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T175._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T179
WHERE ((T179._Fld1194 = CAST(0 AS NUMERIC))) AND ((T179._Fld22973RRef = T175._IDRRef) AND (T179._Fld22974_TYPE = \\010::bytea AND T179._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T179._Fld22974_RRRef = T173._Fld14966RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T180
WHERE ((T180._Fld1194 = CAST(0 AS NUMERIC))) AND ((T180._Fld22980RRef = T175._IDRRef) AND T180._Fld22981_TYPE = \\010::bytea AND T180._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T180._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T173._Fld1194 = CAST(0 AS NUMERIC))) T172
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\361::bytea AND T1._Fld22706_RRRef = T172.IDRRef
LEFT OUTER JOIN (SELECT
T182._Marked AS Marked_,
T182._IDRRef AS IDRRef,
T182._Fld17926RRef AS Fld17926RRef,
T182._Fld1194 AS Fld1194_
FROM _Document557 T182
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T183
INNER JOIN _Reference79 T184
ON (T183._Fld2999 = Документ.СправкиНДФЛДляПередачиВНалоговыйОрган::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T185
WHERE ((T185._Fld1194 = CAST(0 AS NUMERIC))) AND ((T185._Fld26433_TYPE = \\010::bytea AND T185._Fld26433_RTRef = \\000\\000\\000j::bytea AND T185._Fld26433_RRRef = T183._IDRRef) AND (T185._Fld26434RRef = T184._IDRRef))) AND T184._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T184._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document557_VT18058 T188
WHERE ((T188._Fld1194 = CAST(0 AS NUMERIC))) AND ((T182._IDRRef = T188._Document557_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T189
WHERE ((T189._Fld1194 = CAST(0 AS NUMERIC))) AND ((T189._Fld22973RRef = T184._IDRRef) AND (T189._Fld22974_TYPE = \\010::bytea AND T189._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T189._Fld22974_RRRef = T182._Fld17926RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T190
WHERE ((T190._Fld1194 = CAST(0 AS NUMERIC))) AND ((T190._Fld22980RRef = T184._IDRRef) AND T190._Fld22981_TYPE = \\010::bytea AND T190._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T190._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T182._Fld1194 = CAST(0 AS NUMERIC))) T181
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002-::bytea AND T1._Fld22706_RRRef = T181.IDRRef
LEFT OUTER JOIN (SELECT
T192._Marked AS Marked_,
T192._IDRRef AS IDRRef,
T192._Fld1194 AS Fld1194_,
T192._Fld11544RRef AS Fld11544RRef
FROM _Document419 T192
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T193
INNER JOIN _Reference79 T194
ON (T193._Fld2999 = Документ.ЗаявкаНаОткрытиеЛицевыхСчетовСотрудников::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T195
WHERE ((T195._Fld1194 = CAST(0 AS NUMERIC))) AND ((T195._Fld26433_TYPE = \\010::bytea AND T195._Fld26433_RTRef = \\000\\000\\000j::bytea AND T195._Fld26433_RRRef = T193._IDRRef) AND (T195._Fld26434RRef = T194._IDRRef))) AND T194._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T194._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document419_VT11551 T198
WHERE ((T198._Fld1194 = CAST(0 AS NUMERIC))) AND ((T192._IDRRef = T198._Document419_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T199
WHERE ((T199._Fld1194 = CAST(0 AS NUMERIC))) AND ((T199._Fld22973RRef = T194._IDRRef) AND (T199._Fld22974_TYPE = \\010::bytea AND T199._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T199._Fld22974_RRRef = T192._Fld11544RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T200
WHERE ((T200._Fld1194 = CAST(0 AS NUMERIC))) AND ((T200._Fld22980RRef = T194._IDRRef) AND T200._Fld22981_TYPE = \\010::bytea AND T200._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T200._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T192._Fld1194 = CAST(0 AS NUMERIC))) T191
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\243::bytea AND T1._Fld22706_RRRef = T191.IDRRef
LEFT OUTER JOIN _Reference45 T201
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000-::bytea AND T1._Fld22706_RRRef = T201._IDRRef) AND (T201._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T203._Marked AS Marked_,
T203._IDRRef AS IDRRef,
T203._Fld33666RRef AS Fld33666RRef,
T203._Fld1194 AS Fld1194_
FROM _Reference33517 T203
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document423 T204
ON (T203._Fld33666RRef = T204._IDRRef) AND (T204._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T205
INNER JOIN _Reference79 T206
ON (T205._Fld2999 = Справочник.ЗаявлениеНаПредоставлениеСтандартныхВычетовПоНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T207
WHERE ((T207._Fld1194 = CAST(0 AS NUMERIC))) AND ((T207._Fld26433_TYPE = \\010::bytea AND T207._Fld26433_RTRef = \\000\\000\\000j::bytea AND T207._Fld26433_RRRef = T205._IDRRef) AND (T207._Fld26434RRef = T206._IDRRef))) AND T206._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T206._Fld1194 = CAST(0 AS NUMERIC))) AND (((T204._Fld11810RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T210
WHERE ((T210._Fld1194 = CAST(0 AS NUMERIC))) AND ((T210._Fld22973RRef = T206._IDRRef) AND (T210._Fld22974_TYPE = \\010::bytea AND T210._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T210._Fld22974_RRRef = T204._Fld11810RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T211
WHERE ((T211._Fld1194 = CAST(0 AS NUMERIC))) AND ((T211._Fld22980RRef = T206._IDRRef) AND T211._Fld22981_TYPE = CASE WHEN T204._Fld11810RRef IS NOT NULL THEN \\010::bytea END AND T211._Fld22981_RTRef = CASE WHEN T204._Fld11810RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T211._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T204._Fld11811RRef IS NOT NULL))))))) AND (T203._Fld1194 = CAST(0 AS NUMERIC))) T202
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\202\\355::bytea AND T1._Fld22706_RRRef = T202.IDRRef
LEFT OUTER JOIN _Document565 T212
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0025::bytea AND T1._Fld22706_RRRef = T212._IDRRef) AND (T212._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T214._Marked AS Marked_,
T214._IDRRef AS IDRRef,
T214._Fld38495RRef AS Fld38495RRef,
T214._Fld1194 AS Fld1194_
FROM _Document38484 T214
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T215
INNER JOIN _Reference79 T216
ON (T215._Fld2999 = Документ.АктОРасхождениях::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T217
WHERE ((T217._Fld1194 = CAST(0 AS NUMERIC))) AND ((T217._Fld26433_TYPE = \\010::bytea AND T217._Fld26433_RTRef = \\000\\000\\000j::bytea AND T217._Fld26433_RRRef = T215._IDRRef) AND (T217._Fld26434RRef = T216._IDRRef))) AND T216._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T216._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T220
WHERE ((T220._Fld1194 = CAST(0 AS NUMERIC))) AND ((T220._Fld22973RRef = T216._IDRRef) AND (T220._Fld22974_TYPE = \\010::bytea AND T220._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T220._Fld22974_RRRef = T214._Fld38495RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T221
WHERE ((T221._Fld1194 = CAST(0 AS NUMERIC))) AND ((T221._Fld22980RRef = T216._IDRRef) AND T221._Fld22981_TYPE = \\010::bytea AND T221._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T221._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T214._Fld1194 = CAST(0 AS NUMERIC))) T213
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\226T::bytea AND T1._Fld22706_RRRef = T213.IDRRef
LEFT OUTER JOIN (SELECT
T223._Marked AS Marked_,
T223._IDRRef AS IDRRef,
T223._Fld16472RRef AS Fld16472RRef,
T223._Fld1194 AS Fld1194_
FROM _Document526 T223
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T224
INNER JOIN _Reference79 T225
ON (T224._Fld2999 = Документ.РаспределениеНДС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T226
WHERE ((T226._Fld1194 = CAST(0 AS NUMERIC))) AND ((T226._Fld26433_TYPE = \\010::bytea AND T226._Fld26433_RTRef = \\000\\000\\000j::bytea AND T226._Fld26433_RRRef = T224._IDRRef) AND (T226._Fld26434RRef = T225._IDRRef))) AND T225._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T225._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T229
WHERE ((T229._Fld1194 = CAST(0 AS NUMERIC))) AND ((T229._Fld22973RRef = T225._IDRRef) AND (T229._Fld22974_TYPE = \\010::bytea AND T229._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T229._Fld22974_RRRef = T223._Fld16472RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T230
WHERE ((T230._Fld1194 = CAST(0 AS NUMERIC))) AND ((T230._Fld22980RRef = T225._IDRRef) AND T230._Fld22981_TYPE = \\010::bytea AND T230._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T230._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T223._Fld1194 = CAST(0 AS NUMERIC))) T222
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\016::bytea AND T1._Fld22706_RRRef = T222.IDRRef
LEFT OUTER JOIN (SELECT
T232._OwnerIDRRef AS OwnerIDRRef,
T232._Marked AS Marked_,
T232._IDRRef AS IDRRef,
T232._Fld1194 AS Fld1194_
FROM _Reference38859 T232
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T233
INNER JOIN _Reference79 T234
ON (T233._Fld2999 = Справочник.СамостоятельныеКлассификационныеЕдиницы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T235
WHERE ((T235._Fld1194 = CAST(0 AS NUMERIC))) AND ((T235._Fld26433_TYPE = \\010::bytea AND T235._Fld26433_RTRef = \\000\\000\\000j::bytea AND T235._Fld26433_RRRef = T233._IDRRef) AND (T235._Fld26434RRef = T234._IDRRef))) AND T234._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T234._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T238
WHERE ((T238._Fld1194 = CAST(0 AS NUMERIC))) AND ((T238._Fld22973RRef = T234._IDRRef) AND (T238._Fld22974_TYPE = \\010::bytea AND T238._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T238._Fld22974_RRRef = T232._OwnerIDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T239
WHERE ((T239._Fld1194 = CAST(0 AS NUMERIC))) AND ((T239._Fld22980RRef = T234._IDRRef) AND T239._Fld22981_TYPE = \\010::bytea AND T239._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T239._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T232._Fld1194 = CAST(0 AS NUMERIC))) T231
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\313::bytea AND T1._Fld22706_RRRef = T231.IDRRef
LEFT OUTER JOIN _Reference33522 T240
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\202\\362::bytea AND T1._Fld22706_RRRef = T240._IDRRef) AND (T240._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document30911 T241
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\277::bytea AND T1._Fld22706_RRRef = T241._IDRRef) AND (T241._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document567 T242
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0027::bytea AND T1._Fld22706_RRRef = T242._IDRRef) AND (T242._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference110 T243
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000n::bytea AND T1._Fld22706_RRRef = T243._IDRRef) AND (T243._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45390 T244
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261N::bytea AND T1._Fld22706_RRRef = T244._IDRRef) AND (T244._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference36686 T245
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217N::bytea AND T1._Fld22706_RRRef = T245._IDRRef) AND (T245._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T247._Marked AS Marked_,
T247._IDRRef AS IDRRef,
T247._Fld17752RRef AS Fld17752RRef,
T247._Fld1194 AS Fld1194_
FROM _Document555 T247
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T248
INNER JOIN _Reference79 T249
ON (T248._Fld2999 = Документ.СписаниеТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T250
WHERE ((T250._Fld1194 = CAST(0 AS NUMERIC))) AND ((T250._Fld26433_TYPE = \\010::bytea AND T250._Fld26433_RTRef = \\000\\000\\000j::bytea AND T250._Fld26433_RRRef = T248._IDRRef) AND (T250._Fld26434RRef = T249._IDRRef))) AND T249._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T249._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T253
WHERE ((T253._Fld1194 = CAST(0 AS NUMERIC))) AND ((T253._Fld22973RRef = T249._IDRRef) AND (T253._Fld22974_TYPE = \\010::bytea AND T253._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T253._Fld22974_RRRef = T247._Fld17752RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T254
WHERE ((T254._Fld1194 = CAST(0 AS NUMERIC))) AND ((T254._Fld22980RRef = T249._IDRRef) AND T254._Fld22981_TYPE = \\010::bytea AND T254._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T254._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T247._Fld1194 = CAST(0 AS NUMERIC))) T246
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002+::bytea AND T1._Fld22706_RRRef = T246.IDRRef
LEFT OUTER JOIN _Reference45507 T255
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\303::bytea AND T1._Fld22706_RRRef = T255._IDRRef) AND (T255._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T257._Marked AS Marked_,
T257._IDRRef AS IDRRef,
T257._Fld8929RRef AS Fld8929RRef,
T257._Fld1194 AS Fld1194_
FROM _Document369 T257
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T258
INNER JOIN _Reference79 T259
ON (T258._Fld2999 = Документ.АвансовыйОтчет::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T260
WHERE ((T260._Fld1194 = CAST(0 AS NUMERIC))) AND ((T260._Fld26433_TYPE = \\010::bytea AND T260._Fld26433_RTRef = \\000\\000\\000j::bytea AND T260._Fld26433_RRRef = T258._IDRRef) AND (T260._Fld26434RRef = T259._IDRRef))) AND T259._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T259._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T263
WHERE ((T263._Fld1194 = CAST(0 AS NUMERIC))) AND ((T263._Fld22973RRef = T259._IDRRef) AND (T263._Fld22974_TYPE = \\010::bytea AND T263._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T263._Fld22974_RRRef = T257._Fld8929RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T264
WHERE ((T264._Fld1194 = CAST(0 AS NUMERIC))) AND ((T264._Fld22980RRef = T259._IDRRef) AND T264._Fld22981_TYPE = \\010::bytea AND T264._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T264._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T257._Fld1194 = CAST(0 AS NUMERIC))) T256
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001q::bytea AND T1._Fld22706_RRRef = T256.IDRRef
LEFT OUTER JOIN _Reference60 T265
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000<::bytea AND T1._Fld22706_RRRef = T265._IDRRef
LEFT OUTER JOIN _Reference113 T266
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000q::bytea AND T1._Fld22706_RRRef = T266._IDRRef) AND (T266._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T268._Marked AS Marked_,
T268._IDRRef AS IDRRef,
T268._Fld1194 AS Fld1194_,
T268._Fld10907RRef AS Fld10907RRef
FROM _Document404 T268
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T269
INNER JOIN _Reference79 T270
ON (T269._Fld2999 = Документ.ГТДИмпорт::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T271
WHERE ((T271._Fld1194 = CAST(0 AS NUMERIC))) AND ((T271._Fld26433_TYPE = \\010::bytea AND T271._Fld26433_RTRef = \\000\\000\\000j::bytea AND T271._Fld26433_RRRef = T269._IDRRef) AND (T271._Fld26434RRef = T270._IDRRef))) AND T270._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T270._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T274
WHERE ((T274._Fld1194 = CAST(0 AS NUMERIC))) AND ((T274._Fld22973RRef = T270._IDRRef) AND (T274._Fld22974_TYPE = \\010::bytea AND T274._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T274._Fld22974_RRRef = T268._Fld10907RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T275
WHERE ((T275._Fld1194 = CAST(0 AS NUMERIC))) AND ((T275._Fld22980RRef = T270._IDRRef) AND T275._Fld22981_TYPE = \\010::bytea AND T275._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T275._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T268._Fld1194 = CAST(0 AS NUMERIC))) T267
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\224::bytea AND T1._Fld22706_RRRef = T267.IDRRef
LEFT OUTER JOIN (SELECT
T277._Marked AS Marked_,
T277._IDRRef AS IDRRef,
T277._Fld7224RRef AS Fld7224RRef,
T277._Fld1194 AS Fld1194_
FROM _Reference265 T277
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
INNER JOIN _InfoRg23966 T278
ON (T278._Fld23967RRef = T277._IDRRef)
WHERE ((T278._Fld1194 = CAST(0 AS NUMERIC))) AND (EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T279
INNER JOIN _Reference79 T280
ON (T279._Fld2999 = Справочник.Сотрудники::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T281
WHERE ((T281._Fld1194 = CAST(0 AS NUMERIC))) AND ((T281._Fld26433_TYPE = \\010::bytea AND T281._Fld26433_RTRef = \\000\\000\\000j::bytea AND T281._Fld26433_RRRef = T279._IDRRef) AND (T281._Fld26434RRef = T280._IDRRef))) AND T280._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T280._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T284
WHERE ((T284._Fld1194 = CAST(0 AS NUMERIC))) AND ((T284._Fld22973RRef = T280._IDRRef) AND (T284._Fld22974_TYPE = \\010::bytea AND T284._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T284._Fld22974_RRRef = T278._Fld23968RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T285
WHERE ((T285._Fld1194 = CAST(0 AS NUMERIC))) AND ((T285._Fld22980RRef = T280._IDRRef) AND T285._Fld22981_TYPE = \\010::bytea AND T285._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T285._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))))) AND (T277._Fld1194 = CAST(0 AS NUMERIC))) T276
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\011::bytea AND T1._Fld22706_RRRef = T276.IDRRef
LEFT OUTER JOIN (SELECT
T287._Marked AS Marked_,
T287._IDRRef AS IDRRef,
T287._Fld20927RRef AS Fld20927RRef,
T287._Fld1194 AS Fld1194_
FROM _Document631 T287
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T288
INNER JOIN _Reference79 T289
ON (T288._Fld2999 = Документ.ЭлектронныйДокументВходящийЭДО::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T290
WHERE ((T290._Fld1194 = CAST(0 AS NUMERIC))) AND ((T290._Fld26433_TYPE = \\010::bytea AND T290._Fld26433_RTRef = \\000\\000\\000j::bytea AND T290._Fld26433_RRRef = T288._IDRRef) AND (T290._Fld26434RRef = T289._IDRRef))) AND T289._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T289._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T293
WHERE ((T293._Fld1194 = CAST(0 AS NUMERIC))) AND ((T293._Fld22973RRef = T289._IDRRef) AND (T293._Fld22974_TYPE = \\010::bytea AND T293._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T293._Fld22974_RRRef = T287._Fld20927RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T294
WHERE ((T294._Fld1194 = CAST(0 AS NUMERIC))) AND ((T294._Fld22980RRef = T289._IDRRef) AND T294._Fld22981_TYPE = \\010::bytea AND T294._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T294._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T287._Fld1194 = CAST(0 AS NUMERIC))) T286
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002w::bytea AND T1._Fld22706_RRRef = T286.IDRRef
LEFT OUTER JOIN (SELECT
T296._Marked AS Marked_,
T296._IDRRef AS IDRRef,
T296._Fld44448RRef AS Fld44448RRef,
T296._Fld1194 AS Fld1194_
FROM _Document44386 T296
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T297
INNER JOIN _Reference79 T298
ON (T297._Fld2999 = Документ.УведомлениеОВвозеПрослеживаемыхТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T299
WHERE ((T299._Fld1194 = CAST(0 AS NUMERIC))) AND ((T299._Fld26433_TYPE = \\010::bytea AND T299._Fld26433_RTRef = \\000\\000\\000j::bytea AND T299._Fld26433_RRRef = T297._IDRRef) AND (T299._Fld26434RRef = T298._IDRRef))) AND T298._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T298._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T302
WHERE ((T302._Fld1194 = CAST(0 AS NUMERIC))) AND ((T302._Fld22973RRef = T298._IDRRef) AND (T302._Fld22974_TYPE = \\010::bytea AND T302._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T302._Fld22974_RRRef = T296._Fld44448RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T303
WHERE ((T303._Fld1194 = CAST(0 AS NUMERIC))) AND ((T303._Fld22980RRef = T298._IDRRef) AND T303._Fld22981_TYPE = \\010::bytea AND T303._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T303._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T296._Fld1194 = CAST(0 AS NUMERIC))) T295
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255b::bytea AND T1._Fld22706_RRRef = T295.IDRRef
LEFT OUTER JOIN (SELECT
T305._Marked AS Marked_,
T305._IDRRef AS IDRRef,
T305._Fld34717RRef AS Fld34717RRef,
T305._Fld1194 AS Fld1194_
FROM _Reference34054 T305
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document459 T306
ON (T305._Fld34717RRef = T306._IDRRef) AND (T306._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T307
INNER JOIN _Reference79 T308
ON (T307._Fld2999 = Справочник.ОперацияУчетаПоСтраховымВзносамПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T309
WHERE ((T309._Fld1194 = CAST(0 AS NUMERIC))) AND ((T309._Fld26433_TYPE = \\010::bytea AND T309._Fld26433_RTRef = \\000\\000\\000j::bytea AND T309._Fld26433_RRRef = T307._IDRRef) AND (T309._Fld26434RRef = T308._IDRRef))) AND T308._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T308._Fld1194 = CAST(0 AS NUMERIC))) AND (((T306._Fld13286RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T312
WHERE ((T312._Fld1194 = CAST(0 AS NUMERIC))) AND ((T312._Fld22973RRef = T308._IDRRef) AND (T312._Fld22974_TYPE = \\010::bytea AND T312._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T312._Fld22974_RRRef = T306._Fld13286RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T313
WHERE ((T313._Fld1194 = CAST(0 AS NUMERIC))) AND ((T313._Fld22980RRef = T308._IDRRef) AND T313._Fld22981_TYPE = CASE WHEN T306._Fld13286RRef IS NOT NULL THEN \\010::bytea END AND T313._Fld22981_RTRef = CASE WHEN T306._Fld13286RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T313._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T306._Fld13287RRef IS NOT NULL))))))) AND (T305._Fld1194 = CAST(0 AS NUMERIC))) T304
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\006::bytea AND T1._Fld22706_RRRef = T304.IDRRef
LEFT OUTER JOIN _Reference168 T314
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\250::bytea AND T1._Fld22706_RRRef = T314._IDRRef) AND (T314._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T316._Marked AS Marked_,
T316._IDRRef AS IDRRef,
T316._Fld17026RRef AS Fld17026RRef,
T316._Fld1194 AS Fld1194_
FROM _Document539 T316
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T317
INNER JOIN _Reference79 T318
ON (T317._Fld2999 = Документ.РеестрДСВ_3::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T319
WHERE ((T319._Fld1194 = CAST(0 AS NUMERIC))) AND ((T319._Fld26433_TYPE = \\010::bytea AND T319._Fld26433_RTRef = \\000\\000\\000j::bytea AND T319._Fld26433_RRRef = T317._IDRRef) AND (T319._Fld26434RRef = T318._IDRRef))) AND T318._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T318._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document539_VT17041 T322
WHERE ((T322._Fld1194 = CAST(0 AS NUMERIC))) AND ((T316._IDRRef = T322._Document539_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T323
WHERE ((T323._Fld1194 = CAST(0 AS NUMERIC))) AND ((T323._Fld22973RRef = T318._IDRRef) AND (T323._Fld22974_TYPE = \\010::bytea AND T323._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T323._Fld22974_RRRef = T316._Fld17026RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T324
WHERE ((T324._Fld1194 = CAST(0 AS NUMERIC))) AND ((T324._Fld22980RRef = T318._IDRRef) AND T324._Fld22981_TYPE = \\010::bytea AND T324._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T324._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T316._Fld1194 = CAST(0 AS NUMERIC))) T315
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\033::bytea AND T1._Fld22706_RRRef = T315.IDRRef
LEFT OUTER JOIN (SELECT
T326._Marked AS Marked_,
T326._IDRRef AS IDRRef,
T326._Fld12655RRef AS Fld12655RRef,
T326._Fld1194 AS Fld1194_
FROM _Document449 T326
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T327
INNER JOIN _Reference79 T328
ON (T327._Fld2999 = Документ.КорректировкаПоступления::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T329
WHERE ((T329._Fld1194 = CAST(0 AS NUMERIC))) AND ((T329._Fld26433_TYPE = \\010::bytea AND T329._Fld26433_RTRef = \\000\\000\\000j::bytea AND T329._Fld26433_RRRef = T327._IDRRef) AND (T329._Fld26434RRef = T328._IDRRef))) AND T328._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T328._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T332
WHERE ((T332._Fld1194 = CAST(0 AS NUMERIC))) AND ((T332._Fld22973RRef = T328._IDRRef) AND (T332._Fld22974_TYPE = \\010::bytea AND T332._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T332._Fld22974_RRRef = T326._Fld12655RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T333
WHERE ((T333._Fld1194 = CAST(0 AS NUMERIC))) AND ((T333._Fld22980RRef = T328._IDRRef) AND T333._Fld22981_TYPE = \\010::bytea AND T333._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T333._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T326._Fld1194 = CAST(0 AS NUMERIC))) T325
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\301::bytea AND T1._Fld22706_RRRef = T325.IDRRef
LEFT OUTER JOIN (SELECT
T335._Marked AS Marked_,
T335._IDRRef AS IDRRef,
T335._Fld17534RRef AS Fld17534RRef,
T335._Fld1194 AS Fld1194_
FROM _Document548 T335
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T336
INNER JOIN _Reference79 T337
ON (T336._Fld2999 = Документ.СообщениеОбменСБанками::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T338
WHERE ((T338._Fld1194 = CAST(0 AS NUMERIC))) AND ((T338._Fld26433_TYPE = \\010::bytea AND T338._Fld26433_RTRef = \\000\\000\\000j::bytea AND T338._Fld26433_RRRef = T336._IDRRef) AND (T338._Fld26434RRef = T337._IDRRef))) AND T337._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T337._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T341
WHERE ((T341._Fld1194 = CAST(0 AS NUMERIC))) AND ((T341._Fld22973RRef = T337._IDRRef) AND (T341._Fld22974_TYPE = \\010::bytea AND T341._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T341._Fld22974_RRRef = T335._Fld17534RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T342
WHERE ((T342._Fld1194 = CAST(0 AS NUMERIC))) AND ((T342._Fld22980RRef = T337._IDRRef) AND T342._Fld22981_TYPE = \\010::bytea AND T342._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T342._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T335._Fld1194 = CAST(0 AS NUMERIC))) T334
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002$::bytea AND T1._Fld22706_RRRef = T334.IDRRef
LEFT OUTER JOIN _Reference185 T343
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\271::bytea AND T1._Fld22706_RRRef = T343._IDRRef
LEFT OUTER JOIN (SELECT
T345._Marked AS Marked_,
T345._IDRRef AS IDRRef,
T345._Fld20964RRef AS Fld20964RRef,
T345._Fld1194 AS Fld1194_
FROM _Document632 T345
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T346
INNER JOIN _Reference79 T347
ON (T346._Fld2999 = Документ.ЭлектронныйДокументИсходящийЭДО::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T348
WHERE ((T348._Fld1194 = CAST(0 AS NUMERIC))) AND ((T348._Fld26433_TYPE = \\010::bytea AND T348._Fld26433_RTRef = \\000\\000\\000j::bytea AND T348._Fld26433_RRRef = T346._IDRRef) AND (T348._Fld26434RRef = T347._IDRRef))) AND T347._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T347._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T351
WHERE ((T351._Fld1194 = CAST(0 AS NUMERIC))) AND ((T351._Fld22973RRef = T347._IDRRef) AND (T351._Fld22974_TYPE = \\010::bytea AND T351._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T351._Fld22974_RRRef = T345._Fld20964RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T352
WHERE ((T352._Fld1194 = CAST(0 AS NUMERIC))) AND ((T352._Fld22980RRef = T347._IDRRef) AND T352._Fld22981_TYPE = \\010::bytea AND T352._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T352._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T345._Fld1194 = CAST(0 AS NUMERIC))) T344
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002x::bytea AND T1._Fld22706_RRRef = T344.IDRRef
LEFT OUTER JOIN (SELECT
T354._Marked AS Marked_,
T354._IDRRef AS IDRRef,
T354._Fld1194 AS Fld1194_,
T354._Fld10817RRef AS Fld10817RRef
FROM _Document400 T354
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T355
INNER JOIN _Reference79 T356
ON (T355._Fld2999 = Документ.ВыкупПредметовЛизинга::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T357
WHERE ((T357._Fld1194 = CAST(0 AS NUMERIC))) AND ((T357._Fld26433_TYPE = \\010::bytea AND T357._Fld26433_RTRef = \\000\\000\\000j::bytea AND T357._Fld26433_RRRef = T355._IDRRef) AND (T357._Fld26434RRef = T356._IDRRef))) AND T356._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T356._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T360
WHERE ((T360._Fld1194 = CAST(0 AS NUMERIC))) AND ((T360._Fld22973RRef = T356._IDRRef) AND (T360._Fld22974_TYPE = \\010::bytea AND T360._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T360._Fld22974_RRRef = T354._Fld10817RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T361
WHERE ((T361._Fld1194 = CAST(0 AS NUMERIC))) AND ((T361._Fld22980RRef = T356._IDRRef) AND T361._Fld22981_TYPE = \\010::bytea AND T361._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T361._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T354._Fld1194 = CAST(0 AS NUMERIC))) T353
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\220::bytea AND T1._Fld22706_RRRef = T353.IDRRef
LEFT OUTER JOIN (SELECT
T363._Marked AS Marked_,
T363._IDRRef AS IDRRef,
T363._Fld14037RRef AS Fld14037RRef,
T363._Fld1194 AS Fld1194_
FROM _Document474 T363
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T364
INNER JOIN _Reference79 T365
ON (T364._Fld2999 = Документ.ОтчетОператораСистемыПлатон::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T366
WHERE ((T366._Fld1194 = CAST(0 AS NUMERIC))) AND ((T366._Fld26433_TYPE = \\010::bytea AND T366._Fld26433_RTRef = \\000\\000\\000j::bytea AND T366._Fld26433_RRRef = T364._IDRRef) AND (T366._Fld26434RRef = T365._IDRRef))) AND T365._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T365._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T369
WHERE ((T369._Fld1194 = CAST(0 AS NUMERIC))) AND ((T369._Fld22973RRef = T365._IDRRef) AND (T369._Fld22974_TYPE = \\010::bytea AND T369._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T369._Fld22974_RRRef = T363._Fld14037RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T370
WHERE ((T370._Fld1194 = CAST(0 AS NUMERIC))) AND ((T370._Fld22980RRef = T365._IDRRef) AND T370._Fld22981_TYPE = \\010::bytea AND T370._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T370._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T363._Fld1194 = CAST(0 AS NUMERIC))) T362
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\332::bytea AND T1._Fld22706_RRRef = T362.IDRRef
LEFT OUTER JOIN (SELECT
T372._Marked AS Marked_,
T372._IDRRef AS IDRRef,
T372._Fld34603RRef AS Fld34603RRef,
T372._Fld1194 AS Fld1194_
FROM _Reference34051 T372
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document452 T373
ON (T372._Fld34603RRef = T373._IDRRef) AND (T373._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T374
INNER JOIN _Reference79 T375
ON (T374._Fld2999 = Справочник.НачислениеЗарплатыПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T376
WHERE ((T376._Fld1194 = CAST(0 AS NUMERIC))) AND ((T376._Fld26433_TYPE = \\010::bytea AND T376._Fld26433_RTRef = \\000\\000\\000j::bytea AND T376._Fld26433_RRRef = T374._IDRRef) AND (T376._Fld26434RRef = T375._IDRRef))) AND T375._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T375._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document452_VT13045 T379
WHERE ((T379._Fld1194 = CAST(0 AS NUMERIC))) AND ((T372._Fld34603RRef = T379._Document452_IDRRef) AND (NOT (((1=1))))))))) AND ((T373._Fld12958RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T380
WHERE ((T380._Fld1194 = CAST(0 AS NUMERIC))) AND ((T380._Fld22973RRef = T375._IDRRef) AND (T380._Fld22974_TYPE = \\010::bytea AND T380._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T380._Fld22974_RRRef = T373._Fld12958RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T381
WHERE ((T381._Fld1194 = CAST(0 AS NUMERIC))) AND ((T381._Fld22980RRef = T375._IDRRef) AND T381._Fld22981_TYPE = CASE WHEN T373._Fld12958RRef IS NOT NULL THEN \\010::bytea END AND T381._Fld22981_RTRef = CASE WHEN T373._Fld12958RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T381._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T372._Fld1194 = CAST(0 AS NUMERIC))) T371
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\003::bytea AND T1._Fld22706_RRRef = T371.IDRRef
LEFT OUTER JOIN _Reference294 T382
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001&::bytea AND T1._Fld22706_RRRef = T382._IDRRef) AND (T382._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference289 T383
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001!::bytea AND T1._Fld22706_RRRef = T383._IDRRef) AND (T383._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference41 T384
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000)::bytea AND T1._Fld22706_RRRef = T384._IDRRef) AND (T384._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference292 T385
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001$::bytea AND T1._Fld22706_RRRef = T385._IDRRef) AND (T385._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document45539 T386
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\343::bytea AND T1._Fld22706_RRRef = T386._IDRRef) AND (T386._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T388._Marked AS Marked_,
T388._IDRRef AS IDRRef,
T388._Fld14284RRef AS Fld14284RRef,
T388._Fld1194 AS Fld1194_
FROM _Document482 T388
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T389
INNER JOIN _Reference79 T390
ON (T389._Fld2999 = Документ.ПачкаДокументовАДВ_2::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T391
WHERE ((T391._Fld1194 = CAST(0 AS NUMERIC))) AND ((T391._Fld26433_TYPE = \\010::bytea AND T391._Fld26433_RTRef = \\000\\000\\000j::bytea AND T391._Fld26433_RRRef = T389._IDRRef) AND (T391._Fld26434RRef = T390._IDRRef))) AND T390._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T390._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document482_VT14296 T394
WHERE ((T394._Fld1194 = CAST(0 AS NUMERIC))) AND ((T388._IDRRef = T394._Document482_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T395
WHERE ((T395._Fld1194 = CAST(0 AS NUMERIC))) AND ((T395._Fld22973RRef = T390._IDRRef) AND (T395._Fld22974_TYPE = \\010::bytea AND T395._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T395._Fld22974_RRRef = T388._Fld14284RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T396
WHERE ((T396._Fld1194 = CAST(0 AS NUMERIC))) AND ((T396._Fld22980RRef = T390._IDRRef) AND T396._Fld22981_TYPE = \\010::bytea AND T396._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T396._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T388._Fld1194 = CAST(0 AS NUMERIC))) T387
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\342::bytea AND T1._Fld22706_RRRef = T387.IDRRef
LEFT OUTER JOIN (SELECT
T398._Marked AS Marked_,
T398._IDRRef AS IDRRef,
T398._Fld3752RRef AS Fld3752RRef,
T398._Fld1194 AS Fld1194_
FROM _Reference142 T398
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T399
INNER JOIN _Reference79 T400
ON (T399._Fld2999 = Справочник.НастройкиОбменСБанками::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T401
WHERE ((T401._Fld1194 = CAST(0 AS NUMERIC))) AND ((T401._Fld26433_TYPE = \\010::bytea AND T401._Fld26433_RTRef = \\000\\000\\000j::bytea AND T401._Fld26433_RRRef = T399._IDRRef) AND (T401._Fld26434RRef = T400._IDRRef))) AND T400._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T400._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T404
WHERE ((T404._Fld1194 = CAST(0 AS NUMERIC))) AND ((T404._Fld22973RRef = T400._IDRRef) AND (T404._Fld22974_TYPE = \\010::bytea AND T404._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T404._Fld22974_RRRef = T398._Fld3752RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T405
WHERE ((T405._Fld1194 = CAST(0 AS NUMERIC))) AND ((T405._Fld22980RRef = T400._IDRRef) AND T405._Fld22981_TYPE = \\010::bytea AND T405._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T405._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T398._Fld1194 = CAST(0 AS NUMERIC))) T397
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\216::bytea AND T1._Fld22706_RRRef = T397.IDRRef
LEFT OUTER JOIN (SELECT
T407._Marked AS Marked_,
T407._IDRRef AS IDRRef,
T407._Fld1194 AS Fld1194_,
T407._Fld11173RRef AS Fld11173RRef
FROM _Document410 T407
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T408
INNER JOIN _Reference79 T409
ON (T408._Fld2999 = Документ.ДопЛистКнигиПродажДляПередачиВЭлектронномВиде::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T410
WHERE ((T410._Fld1194 = CAST(0 AS NUMERIC))) AND ((T410._Fld26433_TYPE = \\010::bytea AND T410._Fld26433_RTRef = \\000\\000\\000j::bytea AND T410._Fld26433_RRRef = T408._IDRRef) AND (T410._Fld26434RRef = T409._IDRRef))) AND T409._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T409._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T413
WHERE ((T413._Fld1194 = CAST(0 AS NUMERIC))) AND ((T413._Fld22973RRef = T409._IDRRef) AND (T413._Fld22974_TYPE = \\010::bytea AND T413._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T413._Fld22974_RRRef = T407._Fld11173RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T414
WHERE ((T414._Fld1194 = CAST(0 AS NUMERIC))) AND ((T414._Fld22980RRef = T409._IDRRef) AND T414._Fld22981_TYPE = \\010::bytea AND T414._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T414._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T407._Fld1194 = CAST(0 AS NUMERIC))) T406
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\232::bytea AND T1._Fld22706_RRRef = T406.IDRRef
LEFT OUTER JOIN (SELECT
T416._Marked AS Marked_,
T416._IDRRef AS IDRRef,
T416._Fld18856RRef AS Fld18856RRef,
T416._Fld1194 AS Fld1194_
FROM _Document577 T416
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T417
INNER JOIN _Reference79 T418
ON (T417._Fld2999 = Документ.УведомлениеОСписанииКиЗГИСМ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T419
WHERE ((T419._Fld1194 = CAST(0 AS NUMERIC))) AND ((T419._Fld26433_TYPE = \\010::bytea AND T419._Fld26433_RTRef = \\000\\000\\000j::bytea AND T419._Fld26433_RRRef = T417._IDRRef) AND (T419._Fld26434RRef = T418._IDRRef))) AND T418._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T418._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T422
WHERE ((T422._Fld1194 = CAST(0 AS NUMERIC))) AND ((T422._Fld22973RRef = T418._IDRRef) AND (T422._Fld22974_TYPE = \\010::bytea AND T422._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T422._Fld22974_RRRef = T416._Fld18856RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T423
WHERE ((T423._Fld1194 = CAST(0 AS NUMERIC))) AND ((T423._Fld22980RRef = T418._IDRRef) AND T423._Fld22981_TYPE = \\010::bytea AND T423._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T423._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T416._Fld1194 = CAST(0 AS NUMERIC))) T415
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002A::bytea AND T1._Fld22706_RRRef = T415.IDRRef
LEFT OUTER JOIN _Reference45490 T424
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\262::bytea AND T1._Fld22706_RRRef = T424._IDRRef) AND (T424._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document39484 T425
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\232<::bytea AND T1._Fld22706_RRRef = T425._IDRRef) AND (T425._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45313 T426
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\001::bytea AND T1._Fld22706_RRRef = T426._IDRRef) AND (T426._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document30909 T427
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\275::bytea AND T1._Fld22706_RRRef = T427._IDRRef) AND (T427._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference266 T428
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\012::bytea AND T1._Fld22706_RRRef = T428._IDRRef) AND (T428._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T430._Marked AS Marked_,
T430._IDRRef AS IDRRef,
T430._Fld18293RRef AS Fld18293RRef,
T430._Fld1194 AS Fld1194_
FROM _Document562 T430
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T431
INNER JOIN _Reference79 T432
ON (T431._Fld2999 = Документ.СчетФактураВыданный::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T433
WHERE ((T433._Fld1194 = CAST(0 AS NUMERIC))) AND ((T433._Fld26433_TYPE = \\010::bytea AND T433._Fld26433_RTRef = \\000\\000\\000j::bytea AND T433._Fld26433_RRRef = T431._IDRRef) AND (T433._Fld26434RRef = T432._IDRRef))) AND T432._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T432._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T436
WHERE ((T436._Fld1194 = CAST(0 AS NUMERIC))) AND ((T436._Fld22973RRef = T432._IDRRef) AND (T436._Fld22974_TYPE = \\010::bytea AND T436._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T436._Fld22974_RRRef = T430._Fld18293RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T437
WHERE ((T437._Fld1194 = CAST(0 AS NUMERIC))) AND ((T437._Fld22980RRef = T432._IDRRef) AND T437._Fld22981_TYPE = \\010::bytea AND T437._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T437._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T430._Fld1194 = CAST(0 AS NUMERIC))) T429
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0022::bytea AND T1._Fld22706_RRRef = T429.IDRRef
LEFT OUTER JOIN _Reference45392 T438
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261P::bytea AND T1._Fld22706_RRRef = T438._IDRRef) AND (T438._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference146 T439
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\222::bytea AND T1._Fld22706_RRRef = T439._IDRRef) AND (T439._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T441._Marked AS Marked_,
T441._IDRRef AS IDRRef,
T441._Fld13472RRef AS Fld13472RRef,
T441._Fld1194 AS Fld1194_
FROM _Document464 T441
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T442
INNER JOIN _Reference79 T443
ON (T442._Fld2999 = Документ.ОприходованиеТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T444
WHERE ((T444._Fld1194 = CAST(0 AS NUMERIC))) AND ((T444._Fld26433_TYPE = \\010::bytea AND T444._Fld26433_RTRef = \\000\\000\\000j::bytea AND T444._Fld26433_RRRef = T442._IDRRef) AND (T444._Fld26434RRef = T443._IDRRef))) AND T443._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T443._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T447
WHERE ((T447._Fld1194 = CAST(0 AS NUMERIC))) AND ((T447._Fld22973RRef = T443._IDRRef) AND (T447._Fld22974_TYPE = \\010::bytea AND T447._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T447._Fld22974_RRRef = T441._Fld13472RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T448
WHERE ((T448._Fld1194 = CAST(0 AS NUMERIC))) AND ((T448._Fld22980RRef = T443._IDRRef) AND T448._Fld22981_TYPE = \\010::bytea AND T448._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T448._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T441._Fld1194 = CAST(0 AS NUMERIC))) T440
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\320::bytea AND T1._Fld22706_RRRef = T440.IDRRef
LEFT OUTER JOIN (SELECT
T450._Marked AS Marked_,
T450._IDRRef AS IDRRef,
T450._Folder AS Folder_,
T450._Fld2107RRef AS Fld2107RRef,
T450._Fld1194 AS Fld1194_
FROM _Reference68 T450
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T451
ON ((T451._Fld4110RRef = T450._Fld2107RRef) AND (T451._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR (T451._IDRRef = T450._Fld2107RRef)) AND (T451._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T452
INNER JOIN _Reference79 T453
ON (T452._Fld2999 = Справочник.ВидыОплатОрганизаций::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T454
WHERE ((T454._Fld1194 = CAST(0 AS NUMERIC))) AND ((T454._Fld26433_TYPE = \\010::bytea AND T454._Fld26433_RTRef = \\000\\000\\000j::bytea AND T454._Fld26433_RRRef = T452._IDRRef) AND (T454._Fld26434RRef = T453._IDRRef))) AND T453._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T453._Fld1194 = CAST(0 AS NUMERIC))) AND ((T450._Folder = FALSE) OR ((T451._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T457
WHERE ((T457._Fld1194 = CAST(0 AS NUMERIC))) AND ((T457._Fld22973RRef = T453._IDRRef) AND (T457._Fld22974_TYPE = \\010::bytea AND T457._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T457._Fld22974_RRRef = T451._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T458
WHERE ((T458._Fld1194 = CAST(0 AS NUMERIC))) AND ((T458._Fld22980RRef = T453._IDRRef) AND T458._Fld22981_TYPE = CASE WHEN T451._IDRRef IS NOT NULL THEN \\010::bytea END AND T458._Fld22981_RTRef = CASE WHEN T451._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T458._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T450._Fld1194 = CAST(0 AS NUMERIC))) T449
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000D::bytea AND T1._Fld22706_RRRef = T449.IDRRef
LEFT OUTER JOIN (SELECT
T460._Marked AS Marked_,
T460._IDRRef AS IDRRef,
T460._Fld44110_TYPE AS Fld44110_TYPE,
T460._Fld44110_RTRef AS Fld44110_RTRef,
T460._Fld44110_RRRef AS Fld44110_RRRef,
T460._Fld1194 AS Fld1194_
FROM _Document44055 T460
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document632 T461
ON (T460._Fld44110_TYPE = \\010::bytea AND T460._Fld44110_RTRef = \\000\\000\\002x::bytea AND T460._Fld44110_RRRef = T461._IDRRef) AND (T461._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document631 T462
ON (T460._Fld44110_TYPE = \\010::bytea AND T460._Fld44110_RTRef = \\000\\000\\002w::bytea AND T460._Fld44110_RRRef = T462._IDRRef) AND (T462._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T463
INNER JOIN _Reference79 T464
ON (T463._Fld2999 = Документ.СообщениеЭДО::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T465
WHERE ((T465._Fld1194 = CAST(0 AS NUMERIC))) AND ((T465._Fld26433_TYPE = \\010::bytea AND T465._Fld26433_RTRef = \\000\\000\\000j::bytea AND T465._Fld26433_RRRef = T463._IDRRef) AND (T465._Fld26434RRef = T464._IDRRef))) AND T464._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T464._Fld1194 = CAST(0 AS NUMERIC))) AND (((T461._Fld20964RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T468
WHERE ((T468._Fld1194 = CAST(0 AS NUMERIC))) AND ((T468._Fld22973RRef = T464._IDRRef) AND (T468._Fld22974_TYPE = \\010::bytea AND T468._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T468._Fld22974_RRRef = T461._Fld20964RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T469
WHERE ((T469._Fld1194 = CAST(0 AS NUMERIC))) AND ((T469._Fld22980RRef = T464._IDRRef) AND T469._Fld22981_TYPE = CASE WHEN T461._Fld20964RRef IS NOT NULL THEN \\010::bytea END AND T469._Fld22981_RTRef = CASE WHEN T461._Fld20964RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T469._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((T462._Fld20927RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T470
WHERE ((T470._Fld1194 = CAST(0 AS NUMERIC))) AND ((T470._Fld22973RRef = T464._IDRRef) AND (T470._Fld22974_TYPE = \\010::bytea AND T470._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T470._Fld22974_RRRef = T462._Fld20927RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T471
WHERE ((T471._Fld1194 = CAST(0 AS NUMERIC))) AND ((T471._Fld22980RRef = T464._IDRRef) AND T471._Fld22981_TYPE = CASE WHEN T462._Fld20927RRef IS NOT NULL THEN \\010::bytea END AND T471._Fld22981_RTRef = CASE WHEN T462._Fld20927RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T471._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T460._Fld1194 = CAST(0 AS NUMERIC))) T459
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\254\\027::bytea AND T1._Fld22706_RRRef = T459.IDRRef
LEFT OUTER JOIN (SELECT
T473._Marked AS Marked_,
T473._IDRRef AS IDRRef,
T473._Fld17564RRef AS Fld17564RRef,
T473._Fld1194 AS Fld1194_
FROM _Document550 T473
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T474
INNER JOIN _Reference79 T475
ON (T474._Fld2999 = Документ.СписаниеМатериаловИзЭксплуатации::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T476
WHERE ((T476._Fld1194 = CAST(0 AS NUMERIC))) AND ((T476._Fld26433_TYPE = \\010::bytea AND T476._Fld26433_RTRef = \\000\\000\\000j::bytea AND T476._Fld26433_RRRef = T474._IDRRef) AND (T476._Fld26434RRef = T475._IDRRef))) AND T475._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T475._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T479
WHERE ((T479._Fld1194 = CAST(0 AS NUMERIC))) AND ((T479._Fld22973RRef = T475._IDRRef) AND (T479._Fld22974_TYPE = \\010::bytea AND T479._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T479._Fld22974_RRRef = T473._Fld17564RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T480
WHERE ((T480._Fld1194 = CAST(0 AS NUMERIC))) AND ((T480._Fld22980RRef = T475._IDRRef) AND T480._Fld22981_TYPE = \\010::bytea AND T480._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T480._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T473._Fld1194 = CAST(0 AS NUMERIC))) T472
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002&::bytea AND T1._Fld22706_RRRef = T472.IDRRef
LEFT OUTER JOIN (SELECT
T482._OwnerIDRRef AS OwnerIDRRef,
T482._Marked AS Marked_,
T482._IDRRef AS IDRRef,
T482._Fld1194 AS Fld1194_
FROM _Reference85 T482
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T483
ON ((T483._Fld4110RRef = T482._OwnerIDRRef) AND (T483._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR (T483._IDRRef = T482._OwnerIDRRef)) AND (T483._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T484
INNER JOIN _Reference79 T485
ON (T484._Fld2999 = Справочник.ДоверенностиНалогоплательщика::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T486
WHERE ((T486._Fld1194 = CAST(0 AS NUMERIC))) AND ((T486._Fld26433_TYPE = \\010::bytea AND T486._Fld26433_RTRef = \\000\\000\\000j::bytea AND T486._Fld26433_RRRef = T484._IDRRef) AND (T486._Fld26434RRef = T485._IDRRef))) AND T485._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T485._Fld1194 = CAST(0 AS NUMERIC))) AND (((T483._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T489
WHERE ((T489._Fld1194 = CAST(0 AS NUMERIC))) AND ((T489._Fld22973RRef = T485._IDRRef) AND (T489._Fld22974_TYPE = \\010::bytea AND T489._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T489._Fld22974_RRRef = T483._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T490
WHERE ((T490._Fld1194 = CAST(0 AS NUMERIC))) AND ((T490._Fld22980RRef = T485._IDRRef) AND T490._Fld22981_TYPE = CASE WHEN T483._IDRRef IS NOT NULL THEN \\010::bytea END AND T490._Fld22981_RTRef = CASE WHEN T483._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T490._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T482._Fld1194 = CAST(0 AS NUMERIC))) T481
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000U::bytea AND T1._Fld22706_RRRef = T481.IDRRef
LEFT OUTER JOIN (SELECT
T492._Marked AS Marked_,
T492._IDRRef AS IDRRef,
T492._Fld1194 AS Fld1194_,
T492._Fld10778RRef AS Fld10778RRef
FROM _Document399 T492
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T493
INNER JOIN _Reference79 T494
ON (T493._Fld2999 = Документ.ВыдачаДенежныхДокументов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T495
WHERE ((T495._Fld1194 = CAST(0 AS NUMERIC))) AND ((T495._Fld26433_TYPE = \\010::bytea AND T495._Fld26433_RTRef = \\000\\000\\000j::bytea AND T495._Fld26433_RRRef = T493._IDRRef) AND (T495._Fld26434RRef = T494._IDRRef))) AND T494._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T494._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T498
WHERE ((T498._Fld1194 = CAST(0 AS NUMERIC))) AND ((T498._Fld22973RRef = T494._IDRRef) AND (T498._Fld22974_TYPE = \\010::bytea AND T498._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T498._Fld22974_RRRef = T492._Fld10778RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T499
WHERE ((T499._Fld1194 = CAST(0 AS NUMERIC))) AND ((T499._Fld22980RRef = T494._IDRRef) AND T499._Fld22981_TYPE = \\010::bytea AND T499._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T499._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T492._Fld1194 = CAST(0 AS NUMERIC))) T491
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\217::bytea AND T1._Fld22706_RRRef = T491.IDRRef
LEFT OUTER JOIN _Reference71 T500
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000G::bytea AND T1._Fld22706_RRRef = T500._IDRRef
LEFT OUTER JOIN (SELECT
T502._Marked AS Marked_,
T502._IDRRef AS IDRRef,
T502._Fld16887RRef AS Fld16887RRef,
T502._Fld1194 AS Fld1194_
FROM _Document533 T502
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T503
INNER JOIN _Reference79 T504
ON (T503._Fld2999 = Документ.РегистрацияОплатыОсновныхСредствДляУСН::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T505
WHERE ((T505._Fld1194 = CAST(0 AS NUMERIC))) AND ((T505._Fld26433_TYPE = \\010::bytea AND T505._Fld26433_RTRef = \\000\\000\\000j::bytea AND T505._Fld26433_RRRef = T503._IDRRef) AND (T505._Fld26434RRef = T504._IDRRef))) AND T504._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T504._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T508
WHERE ((T508._Fld1194 = CAST(0 AS NUMERIC))) AND ((T508._Fld22973RRef = T504._IDRRef) AND (T508._Fld22974_TYPE = \\010::bytea AND T508._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T508._Fld22974_RRRef = T502._Fld16887RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T509
WHERE ((T509._Fld1194 = CAST(0 AS NUMERIC))) AND ((T509._Fld22980RRef = T504._IDRRef) AND T509._Fld22981_TYPE = \\010::bytea AND T509._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T509._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T502._Fld1194 = CAST(0 AS NUMERIC))) T501
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\025::bytea AND T1._Fld22706_RRRef = T501.IDRRef
LEFT OUTER JOIN _Reference364 T510
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001l::bytea AND T1._Fld22706_RRRef = T510._IDRRef) AND (T510._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference63 T511
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000?::bytea AND T1._Fld22706_RRRef = T511._IDRRef) AND (T511._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45305 T512
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\371::bytea AND T1._Fld22706_RRRef = T512._IDRRef) AND (T512._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T514._Marked AS Marked_,
T514._IDRRef AS IDRRef,
T514._Fld35097RRef AS Fld35097RRef,
T514._Fld1194 AS Fld1194_
FROM _Reference34064 T514
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document540 T515
ON (T514._Fld35097RRef = T515._IDRRef) AND (T515._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T516
INNER JOIN _Reference79 T517
ON (T516._Fld2999 = Справочник.РеестрСведенийНеобходимыхДляНазначенияИВыплатыПособийПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T518
WHERE ((T518._Fld1194 = CAST(0 AS NUMERIC))) AND ((T518._Fld26433_TYPE = \\010::bytea AND T518._Fld26433_RTRef = \\000\\000\\000j::bytea AND T518._Fld26433_RRRef = T516._IDRRef) AND (T518._Fld26434RRef = T517._IDRRef))) AND T517._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T517._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document540_VT17171 T521
WHERE ((T521._Fld1194 = CAST(0 AS NUMERIC))) AND ((T514._Fld35097RRef = T521._Document540_IDRRef) AND (NOT (((1=1))))))))) AND ((T515._Fld17053RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T522
WHERE ((T522._Fld1194 = CAST(0 AS NUMERIC))) AND ((T522._Fld22973RRef = T517._IDRRef) AND (T522._Fld22974_TYPE = \\010::bytea AND T522._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T522._Fld22974_RRRef = T515._Fld17053RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T523
WHERE ((T523._Fld1194 = CAST(0 AS NUMERIC))) AND ((T523._Fld22980RRef = T517._IDRRef) AND T523._Fld22981_TYPE = CASE WHEN T515._Fld17053RRef IS NOT NULL THEN \\010::bytea END AND T523._Fld22981_RTRef = CASE WHEN T515._Fld17053RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T523._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T514._Fld1194 = CAST(0 AS NUMERIC))) T513
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\020::bytea AND T1._Fld22706_RRRef = T513.IDRRef
LEFT OUTER JOIN _Reference45355 T524
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261+::bytea AND T1._Fld22706_RRRef = T524._IDRRef) AND (T524._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document30914 T525
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\302::bytea AND T1._Fld22706_RRRef = T525._IDRRef) AND (T525._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T527._Marked AS Marked_,
T527._IDRRef AS IDRRef,
T527._Fld15271RRef AS Fld15271RRef,
T527._Fld1194 AS Fld1194_
FROM _Document505 T527
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T528
INNER JOIN _Reference79 T529
ON (T528._Fld2999 = Документ.ПлатежноеПоручение::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T530
WHERE ((T530._Fld1194 = CAST(0 AS NUMERIC))) AND ((T530._Fld26433_TYPE = \\010::bytea AND T530._Fld26433_RTRef = \\000\\000\\000j::bytea AND T530._Fld26433_RRRef = T528._IDRRef) AND (T530._Fld26434RRef = T529._IDRRef))) AND T529._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T529._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T533
WHERE ((T533._Fld1194 = CAST(0 AS NUMERIC))) AND ((T533._Fld22973RRef = T529._IDRRef) AND (T533._Fld22974_TYPE = \\010::bytea AND T533._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T533._Fld22974_RRRef = T527._Fld15271RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T534
WHERE ((T534._Fld1194 = CAST(0 AS NUMERIC))) AND ((T534._Fld22980RRef = T529._IDRRef) AND T534._Fld22981_TYPE = \\010::bytea AND T534._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T534._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T527._Fld1194 = CAST(0 AS NUMERIC))) T526
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\371::bytea AND T1._Fld22706_RRRef = T526.IDRRef
LEFT OUTER JOIN _Reference165 T535
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\245::bytea AND T1._Fld22706_RRRef = T535._IDRRef
LEFT OUTER JOIN _Reference45512 T536
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\310::bytea AND T1._Fld22706_RRRef = T536._IDRRef) AND (T536._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T538._Marked AS Marked_,
T538._IDRRef AS IDRRef,
T538._Fld38336RRef AS Fld38336RRef,
T538._Fld1194 AS Fld1194_
FROM _Document38294 T538
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T539
INNER JOIN _Reference79 T540
ON (T539._Fld2999 = Документ.СведенияОТрудовойДеятельностиРаботниковСЗВ_ТД::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T541
WHERE ((T541._Fld1194 = CAST(0 AS NUMERIC))) AND ((T541._Fld26433_TYPE = \\010::bytea AND T541._Fld26433_RTRef = \\000\\000\\000j::bytea AND T541._Fld26433_RRRef = T539._IDRRef) AND (T541._Fld26434RRef = T540._IDRRef))) AND T540._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T540._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document38294_VT38389 T544
WHERE ((T544._Fld1194 = CAST(0 AS NUMERIC))) AND ((T538._IDRRef = T544._Document38294_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T545
WHERE ((T545._Fld1194 = CAST(0 AS NUMERIC))) AND ((T545._Fld22973RRef = T540._IDRRef) AND (T545._Fld22974_TYPE = \\010::bytea AND T545._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T545._Fld22974_RRRef = T538._Fld38336RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T546
WHERE ((T546._Fld1194 = CAST(0 AS NUMERIC))) AND ((T546._Fld22980RRef = T540._IDRRef) AND T546._Fld22981_TYPE = \\010::bytea AND T546._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T546._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T538._Fld1194 = CAST(0 AS NUMERIC))) T537
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\225\\226::bytea AND T1._Fld22706_RRRef = T537.IDRRef
LEFT OUTER JOIN _Reference368 T547
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001p::bytea AND T1._Fld22706_RRRef = T547._IDRRef) AND (T547._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T549._Marked AS Marked_,
T549._IDRRef AS IDRRef,
T549._Fld1194 AS Fld1194_,
T549._Fld10516RRef AS Fld10516RRef,
T549._Fld10515RRef AS Fld10515RRef
FROM _Document392 T549
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T550
INNER JOIN _Reference79 T551
ON (T550._Fld2999 = Документ.ВозвратНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T552
WHERE ((T552._Fld1194 = CAST(0 AS NUMERIC))) AND ((T552._Fld26433_TYPE = \\010::bytea AND T552._Fld26433_RTRef = \\000\\000\\000j::bytea AND T552._Fld26433_RRRef = T550._IDRRef) AND (T552._Fld26434RRef = T551._IDRRef))) AND T551._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T551._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T555
WHERE ((T555._Fld1194 = CAST(0 AS NUMERIC))) AND ((T555._Fld22973RRef = T551._IDRRef) AND (T555._Fld22974_TYPE = \\010::bytea AND T555._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T555._Fld22974_RRRef = T549._Fld10515RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T556
WHERE ((T556._Fld1194 = CAST(0 AS NUMERIC))) AND ((T556._Fld22980RRef = T551._IDRRef) AND T556._Fld22981_TYPE = \\010::bytea AND T556._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T556._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T549._Fld1194 = CAST(0 AS NUMERIC))) T548
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\210::bytea AND T1._Fld22706_RRRef = T548.IDRRef
LEFT OUTER JOIN _Document45538 T557
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\342::bytea AND T1._Fld22706_RRRef = T557._IDRRef) AND (T557._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T559._Marked AS Marked_,
T559._IDRRef AS IDRRef,
T559._Fld14877RRef AS Fld14877RRef,
T559._Fld1194 AS Fld1194_
FROM _Document494 T559
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T560
INNER JOIN _Reference79 T561
ON (T560._Fld2999 = Документ.ПередачаМатериаловВЭксплуатацию::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T562
WHERE ((T562._Fld1194 = CAST(0 AS NUMERIC))) AND ((T562._Fld26433_TYPE = \\010::bytea AND T562._Fld26433_RTRef = \\000\\000\\000j::bytea AND T562._Fld26433_RRRef = T560._IDRRef) AND (T562._Fld26434RRef = T561._IDRRef))) AND T561._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T561._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T565
WHERE ((T565._Fld1194 = CAST(0 AS NUMERIC))) AND ((T565._Fld22973RRef = T561._IDRRef) AND (T565._Fld22974_TYPE = \\010::bytea AND T565._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T565._Fld22974_RRRef = T559._Fld14877RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T566
WHERE ((T566._Fld1194 = CAST(0 AS NUMERIC))) AND ((T566._Fld22980RRef = T561._IDRRef) AND T566._Fld22981_TYPE = \\010::bytea AND T566._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T566._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T559._Fld1194 = CAST(0 AS NUMERIC))) T558
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\356::bytea AND T1._Fld22706_RRRef = T558.IDRRef
LEFT OUTER JOIN _Reference42834 T567
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\247R::bytea AND T1._Fld22706_RRRef = T567._IDRRef) AND (T567._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T569._Marked AS Marked_,
T569._IDRRef AS IDRRef,
T569._Fld18504RRef AS Fld18504RRef,
T569._Fld1194 AS Fld1194_
FROM _Document564 T569
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T570
INNER JOIN _Reference79 T571
ON (T570._Fld2999 = Документ.ТаможеннаяДекларацияЭкспорт::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T572
WHERE ((T572._Fld1194 = CAST(0 AS NUMERIC))) AND ((T572._Fld26433_TYPE = \\010::bytea AND T572._Fld26433_RTRef = \\000\\000\\000j::bytea AND T572._Fld26433_RRRef = T570._IDRRef) AND (T572._Fld26434RRef = T571._IDRRef))) AND T571._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T571._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T575
WHERE ((T575._Fld1194 = CAST(0 AS NUMERIC))) AND ((T575._Fld22973RRef = T571._IDRRef) AND (T575._Fld22974_TYPE = \\010::bytea AND T575._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T575._Fld22974_RRRef = T569._Fld18504RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T576
WHERE ((T576._Fld1194 = CAST(0 AS NUMERIC))) AND ((T576._Fld22980RRef = T571._IDRRef) AND T576._Fld22981_TYPE = \\010::bytea AND T576._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T576._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T569._Fld1194 = CAST(0 AS NUMERIC))) T568
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0024::bytea AND T1._Fld22706_RRRef = T568.IDRRef
LEFT OUTER JOIN _Reference112 T577
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000p::bytea AND T1._Fld22706_RRRef = T577._IDRRef
LEFT OUTER JOIN _Reference170 T578
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\252::bytea AND T1._Fld22706_RRRef = T578._IDRRef
LEFT OUTER JOIN (SELECT
T580._Marked AS Marked_,
T580._IDRRef AS IDRRef,
T580._Fld18796RRef AS Fld18796RRef,
T580._Fld1194 AS Fld1194_
FROM _Document574 T580
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T581
INNER JOIN _Reference79 T582
ON (T581._Fld2999 = Документ.УведомлениеОПоступленииМаркированныхТоваровГИСМ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T583
WHERE ((T583._Fld1194 = CAST(0 AS NUMERIC))) AND ((T583._Fld26433_TYPE = \\010::bytea AND T583._Fld26433_RTRef = \\000\\000\\000j::bytea AND T583._Fld26433_RRRef = T581._IDRRef) AND (T583._Fld26434RRef = T582._IDRRef))) AND T582._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T582._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T586
WHERE ((T586._Fld1194 = CAST(0 AS NUMERIC))) AND ((T586._Fld22973RRef = T582._IDRRef) AND (T586._Fld22974_TYPE = \\010::bytea AND T586._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T586._Fld22974_RRRef = T580._Fld18796RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T587
WHERE ((T587._Fld1194 = CAST(0 AS NUMERIC))) AND ((T587._Fld22980RRef = T582._IDRRef) AND T587._Fld22981_TYPE = \\010::bytea AND T587._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T587._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T580._Fld1194 = CAST(0 AS NUMERIC))) T579
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002>::bytea AND T1._Fld22706_RRRef = T579.IDRRef
LEFT OUTER JOIN (SELECT
T589._Marked AS Marked_,
T589._IDRRef AS IDRRef,
T589._Fld44991RRef AS Fld44991RRef,
T589._Fld1194 AS Fld1194_
FROM _Document44979 T589
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T590
INNER JOIN _Reference79 T591
ON (T590._Fld2999 = Документ.ВыплатыСамозанятым::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T592
WHERE ((T592._Fld1194 = CAST(0 AS NUMERIC))) AND ((T592._Fld26433_TYPE = \\010::bytea AND T592._Fld26433_RTRef = \\000\\000\\000j::bytea AND T592._Fld26433_RRRef = T590._IDRRef) AND (T592._Fld26434RRef = T591._IDRRef))) AND T591._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T591._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T595
WHERE ((T595._Fld1194 = CAST(0 AS NUMERIC))) AND ((T595._Fld22973RRef = T591._IDRRef) AND (T595._Fld22974_TYPE = \\010::bytea AND T595._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T595._Fld22974_RRRef = T589._Fld44991RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T596
WHERE ((T596._Fld1194 = CAST(0 AS NUMERIC))) AND ((T596._Fld22980RRef = T591._IDRRef) AND T596._Fld22981_TYPE = \\010::bytea AND T596._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T596._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T589._Fld1194 = CAST(0 AS NUMERIC))) T588
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\257\\263::bytea AND T1._Fld22706_RRRef = T588.IDRRef
LEFT OUTER JOIN (SELECT
T598._Marked AS Marked_,
T598._IDRRef AS IDRRef,
T598._Fld4708RRef AS Fld4708RRef,
T598._Fld1194 AS Fld1194_
FROM _Reference182 T598
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document478 T599
ON (T598._Fld4708RRef = T599._IDRRef) AND (T599._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T600
INNER JOIN _Reference79 T601
ON (T600._Fld2999 = Справочник.ТранспортныйКонтейнерЭДОПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T602
WHERE ((T602._Fld1194 = CAST(0 AS NUMERIC))) AND ((T602._Fld26433_TYPE = \\010::bytea AND T602._Fld26433_RTRef = \\000\\000\\000j::bytea AND T602._Fld26433_RRRef = T600._IDRRef) AND (T602._Fld26434RRef = T601._IDRRef))) AND T601._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T601._Fld1194 = CAST(0 AS NUMERIC))) AND (((T599._Fld14219RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T605
WHERE ((T605._Fld1194 = CAST(0 AS NUMERIC))) AND ((T605._Fld22973RRef = T601._IDRRef) AND (T605._Fld22974_TYPE = \\010::bytea AND T605._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T605._Fld22974_RRRef = T599._Fld14219RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T606
WHERE ((T606._Fld1194 = CAST(0 AS NUMERIC))) AND ((T606._Fld22980RRef = T601._IDRRef) AND T606._Fld22981_TYPE = CASE WHEN T599._Fld14219RRef IS NOT NULL THEN \\010::bytea END AND T606._Fld22981_RTRef = CASE WHEN T599._Fld14219RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T606._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T598._Fld1194 = CAST(0 AS NUMERIC))) T597
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\266::bytea AND T1._Fld22706_RRRef = T597.IDRRef
LEFT OUTER JOIN (SELECT
T608._Marked AS Marked_,
T608._IDRRef AS IDRRef,
T608._Fld1194 AS Fld1194_,
T608._Fld11106RRef AS Fld11106RRef
FROM _Document408 T608
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T609
INNER JOIN _Reference79 T610
ON (T609._Fld2999 = Документ.ДокументРасчетовСКонтрагентом::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T611
WHERE ((T611._Fld1194 = CAST(0 AS NUMERIC))) AND ((T611._Fld26433_TYPE = \\010::bytea AND T611._Fld26433_RTRef = \\000\\000\\000j::bytea AND T611._Fld26433_RRRef = T609._IDRRef) AND (T611._Fld26434RRef = T610._IDRRef))) AND T610._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T610._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T614
WHERE ((T614._Fld1194 = CAST(0 AS NUMERIC))) AND ((T614._Fld22973RRef = T610._IDRRef) AND (T614._Fld22974_TYPE = \\010::bytea AND T614._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T614._Fld22974_RRRef = T608._Fld11106RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T615
WHERE ((T615._Fld1194 = CAST(0 AS NUMERIC))) AND ((T615._Fld22980RRef = T610._IDRRef) AND T615._Fld22981_TYPE = \\010::bytea AND T615._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T615._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T608._Fld1194 = CAST(0 AS NUMERIC))) T607
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\230::bytea AND T1._Fld22706_RRRef = T607.IDRRef
LEFT OUTER JOIN _Reference75 T616
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000K::bytea AND T1._Fld22706_RRRef = T616._IDRRef) AND (T616._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference36692 T617
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217T::bytea AND T1._Fld22706_RRRef = T617._IDRRef
LEFT OUTER JOIN _Reference280 T618
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\030::bytea AND T1._Fld22706_RRRef = T618._IDRRef
LEFT OUTER JOIN _Document630 T619
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002v::bytea AND T1._Fld22706_RRRef = T619._IDRRef) AND (T619._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document44056 T620
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\254\\030::bytea AND T1._Fld22706_RRRef = T620._IDRRef) AND (T620._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45521 T621
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\321::bytea AND T1._Fld22706_RRRef = T621._IDRRef) AND (T621._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document417 T622
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\241::bytea AND T1._Fld22706_RRRef = T622._IDRRef) AND (T622._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T624._Marked AS Marked_,
T624._IDRRef AS IDRRef,
T624._Fld34869RRef AS Fld34869RRef,
T624._Fld1194 AS Fld1194_
FROM _Reference34058 T624
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document468 T625
ON (T624._Fld34869RRef = T625._IDRRef) AND (T625._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T626
INNER JOIN _Reference79 T627
ON (T626._Fld2999 = Справочник.ОтражениеЗарплатыВБухучетеПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T628
WHERE ((T628._Fld1194 = CAST(0 AS NUMERIC))) AND ((T628._Fld26433_TYPE = \\010::bytea AND T628._Fld26433_RTRef = \\000\\000\\000j::bytea AND T628._Fld26433_RRRef = T626._IDRRef) AND (T628._Fld26434RRef = T627._IDRRef))) AND T627._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T627._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document468_VT13671 T631
WHERE ((T631._Fld1194 = CAST(0 AS NUMERIC))) AND ((T624._Fld34869RRef = T631._Document468_IDRRef) AND (NOT (((1=1))))))))) AND ((T625._Fld13605RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T632
WHERE ((T632._Fld1194 = CAST(0 AS NUMERIC))) AND ((T632._Fld22973RRef = T627._IDRRef) AND (T632._Fld22974_TYPE = \\010::bytea AND T632._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T632._Fld22974_RRRef = T625._Fld13605RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T633
WHERE ((T633._Fld1194 = CAST(0 AS NUMERIC))) AND ((T633._Fld22980RRef = T627._IDRRef) AND T633._Fld22981_TYPE = CASE WHEN T625._Fld13605RRef IS NOT NULL THEN \\010::bytea END AND T633._Fld22981_RTRef = CASE WHEN T625._Fld13605RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T633._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T624._Fld1194 = CAST(0 AS NUMERIC))) T623
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\012::bytea AND T1._Fld22706_RRRef = T623.IDRRef
LEFT OUTER JOIN (SELECT
T635._Marked AS Marked_,
T635._IDRRef AS IDRRef,
T635._Fld1194 AS Fld1194_,
T635._Fld11087RRef AS Fld11087RRef
FROM _Document407 T635
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T636
INNER JOIN _Reference79 T637
ON (T636._Fld2999 = Документ.Доверенность::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T638
WHERE ((T638._Fld1194 = CAST(0 AS NUMERIC))) AND ((T638._Fld26433_TYPE = \\010::bytea AND T638._Fld26433_RTRef = \\000\\000\\000j::bytea AND T638._Fld26433_RRRef = T636._IDRRef) AND (T638._Fld26434RRef = T637._IDRRef))) AND T637._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T637._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T641
WHERE ((T641._Fld1194 = CAST(0 AS NUMERIC))) AND ((T641._Fld22973RRef = T637._IDRRef) AND (T641._Fld22974_TYPE = \\010::bytea AND T641._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T641._Fld22974_RRRef = T635._Fld11087RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T642
WHERE ((T642._Fld1194 = CAST(0 AS NUMERIC))) AND ((T642._Fld22980RRef = T637._IDRRef) AND T642._Fld22981_TYPE = \\010::bytea AND T642._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T642._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T635._Fld1194 = CAST(0 AS NUMERIC))) T634
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\227::bytea AND T1._Fld22706_RRRef = T634.IDRRef
LEFT OUTER JOIN (SELECT
T644._Marked AS Marked_,
T644._IDRRef AS IDRRef,
T644._Fld34983RRef AS Fld34983RRef,
T644._Fld1194 AS Fld1194_
FROM _Reference34061 T644
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document520 T645
ON (T644._Fld34983RRef = T645._IDRRef) AND (T645._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T646
INNER JOIN _Reference79 T647
ON (T646._Fld2999 = Справочник.ПрекращениеСтандартныхВычетовНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T648
WHERE ((T648._Fld1194 = CAST(0 AS NUMERIC))) AND ((T648._Fld26433_TYPE = \\010::bytea AND T648._Fld26433_RTRef = \\000\\000\\000j::bytea AND T648._Fld26433_RRRef = T646._IDRRef) AND (T648._Fld26434RRef = T647._IDRRef))) AND T647._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T647._Fld1194 = CAST(0 AS NUMERIC))) AND (((T645._Fld16243RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T651
WHERE ((T651._Fld1194 = CAST(0 AS NUMERIC))) AND ((T651._Fld22973RRef = T647._IDRRef) AND (T651._Fld22974_TYPE = \\010::bytea AND T651._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T651._Fld22974_RRRef = T645._Fld16243RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T652
WHERE ((T652._Fld1194 = CAST(0 AS NUMERIC))) AND ((T652._Fld22980RRef = T647._IDRRef) AND T652._Fld22981_TYPE = CASE WHEN T645._Fld16243RRef IS NOT NULL THEN \\010::bytea END AND T652._Fld22981_RTRef = CASE WHEN T645._Fld16243RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T652._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T645._Fld16244RRef IS NOT NULL))))))) AND (T644._Fld1194 = CAST(0 AS NUMERIC))) T643
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\015::bytea AND T1._Fld22706_RRRef = T643.IDRRef
LEFT OUTER JOIN _Reference45304 T653
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\370::bytea AND T1._Fld22706_RRRef = T653._IDRRef) AND (T653._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T655._Marked AS Marked_,
T655._IDRRef AS IDRRef,
T655._Fld16316RRef AS Fld16316RRef,
T655._Fld1194 AS Fld1194_
FROM _Document523 T655
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T656
INNER JOIN _Reference79 T657
ON (T656._Fld2999 = Документ.ПринятиеКУчетуОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T658
WHERE ((T658._Fld1194 = CAST(0 AS NUMERIC))) AND ((T658._Fld26433_TYPE = \\010::bytea AND T658._Fld26433_RTRef = \\000\\000\\000j::bytea AND T658._Fld26433_RRRef = T656._IDRRef) AND (T658._Fld26434RRef = T657._IDRRef))) AND T657._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T657._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T661
WHERE ((T661._Fld1194 = CAST(0 AS NUMERIC))) AND ((T661._Fld22973RRef = T657._IDRRef) AND (T661._Fld22974_TYPE = \\010::bytea AND T661._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T661._Fld22974_RRRef = T655._Fld16316RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T662
WHERE ((T662._Fld1194 = CAST(0 AS NUMERIC))) AND ((T662._Fld22980RRef = T657._IDRRef) AND T662._Fld22981_TYPE = \\010::bytea AND T662._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T662._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T655._Fld1194 = CAST(0 AS NUMERIC))) T654
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\013::bytea AND T1._Fld22706_RRRef = T654.IDRRef
LEFT OUTER JOIN (SELECT
T664._Marked AS Marked_,
T664._IDRRef AS IDRRef,
T664._Fld12147RRef AS Fld12147RRef,
T664._Fld1194 AS Fld1194_
FROM _Document431 T664
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T665
INNER JOIN _Reference79 T666
ON (T665._Fld2999 = Документ.ИзменениеСпециальногоКоэффициентаНМА::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T667
WHERE ((T667._Fld1194 = CAST(0 AS NUMERIC))) AND ((T667._Fld26433_TYPE = \\010::bytea AND T667._Fld26433_RTRef = \\000\\000\\000j::bytea AND T667._Fld26433_RRRef = T665._IDRRef) AND (T667._Fld26434RRef = T666._IDRRef))) AND T666._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T666._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T670
WHERE ((T670._Fld1194 = CAST(0 AS NUMERIC))) AND ((T670._Fld22973RRef = T666._IDRRef) AND (T670._Fld22974_TYPE = \\010::bytea AND T670._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T670._Fld22974_RRRef = T664._Fld12147RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T671
WHERE ((T671._Fld1194 = CAST(0 AS NUMERIC))) AND ((T671._Fld22980RRef = T666._IDRRef) AND T671._Fld22981_TYPE = \\010::bytea AND T671._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T671._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T664._Fld1194 = CAST(0 AS NUMERIC))) T663
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\257::bytea AND T1._Fld22706_RRRef = T663.IDRRef
LEFT OUTER JOIN (SELECT
T673._Marked AS Marked_,
T673._IDRRef AS IDRRef,
T673._Fld7390RRef AS Fld7390RRef,
T673._Fld1194 AS Fld1194_
FROM _Reference277 T673
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document557 T674
ON (T673._Fld7390RRef = T674._IDRRef) AND (T674._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T675
INNER JOIN _Reference79 T676
ON (T675._Fld2999 = Справочник.СправкиНДФЛДляПередачиВНалоговыйОрганПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T677
WHERE ((T677._Fld1194 = CAST(0 AS NUMERIC))) AND ((T677._Fld26433_TYPE = \\010::bytea AND T677._Fld26433_RTRef = \\000\\000\\000j::bytea AND T677._Fld26433_RRRef = T675._IDRRef) AND (T677._Fld26434RRef = T676._IDRRef))) AND T676._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T676._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document557_VT18058 T680
WHERE ((T680._Fld1194 = CAST(0 AS NUMERIC))) AND ((T673._Fld7390RRef = T680._Document557_IDRRef) AND (NOT (((1=1))))))))) AND ((T674._Fld17926RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T681
WHERE ((T681._Fld1194 = CAST(0 AS NUMERIC))) AND ((T681._Fld22973RRef = T676._IDRRef) AND (T681._Fld22974_TYPE = \\010::bytea AND T681._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T681._Fld22974_RRRef = T674._Fld17926RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T682
WHERE ((T682._Fld1194 = CAST(0 AS NUMERIC))) AND ((T682._Fld22980RRef = T676._IDRRef) AND T682._Fld22981_TYPE = CASE WHEN T674._Fld17926RRef IS NOT NULL THEN \\010::bytea END AND T682._Fld22981_RTRef = CASE WHEN T674._Fld17926RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T682._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T673._Fld1194 = CAST(0 AS NUMERIC))) T672
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\025::bytea AND T1._Fld22706_RRRef = T672.IDRRef
LEFT OUTER JOIN (SELECT
T684._Marked AS Marked_,
T684._IDRRef AS IDRRef,
T684._Fld15628RRef AS Fld15628RRef,
T684._Fld1194 AS Fld1194_
FROM _Document516 T684
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T685
INNER JOIN _Reference79 T686
ON (T685._Fld2999 = Документ.ПоступлениеНаРасчетныйСчет::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T687
WHERE ((T687._Fld1194 = CAST(0 AS NUMERIC))) AND ((T687._Fld26433_TYPE = \\010::bytea AND T687._Fld26433_RTRef = \\000\\000\\000j::bytea AND T687._Fld26433_RRRef = T685._IDRRef) AND (T687._Fld26434RRef = T686._IDRRef))) AND T686._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T686._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T690
WHERE ((T690._Fld1194 = CAST(0 AS NUMERIC))) AND ((T690._Fld22973RRef = T686._IDRRef) AND (T690._Fld22974_TYPE = \\010::bytea AND T690._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T690._Fld22974_RRRef = T684._Fld15628RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T691
WHERE ((T691._Fld1194 = CAST(0 AS NUMERIC))) AND ((T691._Fld22980RRef = T686._IDRRef) AND T691._Fld22981_TYPE = \\010::bytea AND T691._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T691._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T684._Fld1194 = CAST(0 AS NUMERIC))) T683
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\004::bytea AND T1._Fld22706_RRRef = T683.IDRRef
LEFT OUTER JOIN _Reference216 T692
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\330::bytea AND T1._Fld22706_RRRef = T692._IDRRef) AND (T692._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T694._Marked AS Marked_,
T694._IDRRef AS IDRRef,
T694._Fld1194 AS Fld1194_,
T694._Fld11071RRef AS Fld11071RRef
FROM _Document406 T694
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T695
INNER JOIN _Reference79 T696
ON (T695._Fld2999 = Документ.ДепонированиеЗарплаты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T697
WHERE ((T697._Fld1194 = CAST(0 AS NUMERIC))) AND ((T697._Fld26433_TYPE = \\010::bytea AND T697._Fld26433_RTRef = \\000\\000\\000j::bytea AND T697._Fld26433_RRRef = T695._IDRRef) AND (T697._Fld26434RRef = T696._IDRRef))) AND T696._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T696._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document406_VT11079 T700
WHERE ((T700._Fld1194 = CAST(0 AS NUMERIC))) AND ((T694._IDRRef = T700._Document406_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T701
WHERE ((T701._Fld1194 = CAST(0 AS NUMERIC))) AND ((T701._Fld22973RRef = T696._IDRRef) AND (T701._Fld22974_TYPE = \\010::bytea AND T701._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T701._Fld22974_RRRef = T694._Fld11071RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T702
WHERE ((T702._Fld1194 = CAST(0 AS NUMERIC))) AND ((T702._Fld22980RRef = T696._IDRRef) AND T702._Fld22981_TYPE = \\010::bytea AND T702._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T702._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T694._Fld1194 = CAST(0 AS NUMERIC))) T693
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\226::bytea AND T1._Fld22706_RRRef = T693.IDRRef
LEFT OUTER JOIN (SELECT
T704._Marked AS Marked_,
T704._IDRRef AS IDRRef,
T704._Fld12782RRef AS Fld12782RRef,
T704._Fld1194 AS Fld1194_
FROM _Document450 T704
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T705
INNER JOIN _Reference79 T706
ON (T705._Fld2999 = Документ.КорректировкаРеализации::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T707
WHERE ((T707._Fld1194 = CAST(0 AS NUMERIC))) AND ((T707._Fld26433_TYPE = \\010::bytea AND T707._Fld26433_RTRef = \\000\\000\\000j::bytea AND T707._Fld26433_RRRef = T705._IDRRef) AND (T707._Fld26434RRef = T706._IDRRef))) AND T706._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T706._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T710
WHERE ((T710._Fld1194 = CAST(0 AS NUMERIC))) AND ((T710._Fld22973RRef = T706._IDRRef) AND (T710._Fld22974_TYPE = \\010::bytea AND T710._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T710._Fld22974_RRRef = T704._Fld12782RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T711
WHERE ((T711._Fld1194 = CAST(0 AS NUMERIC))) AND ((T711._Fld22980RRef = T706._IDRRef) AND T711._Fld22981_TYPE = \\010::bytea AND T711._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T711._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T704._Fld1194 = CAST(0 AS NUMERIC))) T703
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\302::bytea AND T1._Fld22706_RRRef = T703.IDRRef
LEFT OUTER JOIN _Reference40364 T712
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\235\\254::bytea AND T1._Fld22706_RRRef = T712._IDRRef
LEFT OUTER JOIN (SELECT
T714._Marked AS Marked_,
T714._IDRRef AS IDRRef,
T714._Fld35211RRef AS Fld35211RRef,
T714._Fld1194 AS Fld1194_
FROM _Reference34067 T714
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document558 T715
ON (T714._Fld35211RRef = T715._IDRRef) AND (T715._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T716
INNER JOIN _Reference79 T717
ON (T716._Fld2999 = Справочник.СправкиПоНДФЛДляРасчетаПоНалогуНаПрибыльПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T718
WHERE ((T718._Fld1194 = CAST(0 AS NUMERIC))) AND ((T718._Fld26433_TYPE = \\010::bytea AND T718._Fld26433_RTRef = \\000\\000\\000j::bytea AND T718._Fld26433_RRRef = T716._IDRRef) AND (T718._Fld26434RRef = T717._IDRRef))) AND T717._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T717._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document558_VT18181 T721
WHERE ((T721._Fld1194 = CAST(0 AS NUMERIC))) AND ((T714._Fld35211RRef = T721._Document558_IDRRef) AND (NOT (((1=1))))))))) AND ((T715._Fld18083RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T722
WHERE ((T722._Fld1194 = CAST(0 AS NUMERIC))) AND ((T722._Fld22973RRef = T717._IDRRef) AND (T722._Fld22974_TYPE = \\010::bytea AND T722._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T722._Fld22974_RRRef = T715._Fld18083RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T723
WHERE ((T723._Fld1194 = CAST(0 AS NUMERIC))) AND ((T723._Fld22980RRef = T717._IDRRef) AND T723._Fld22981_TYPE = CASE WHEN T715._Fld18083RRef IS NOT NULL THEN \\010::bytea END AND T723._Fld22981_RTRef = CASE WHEN T715._Fld18083RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T723._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T714._Fld1194 = CAST(0 AS NUMERIC))) T713
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\023::bytea AND T1._Fld22706_RRRef = T713.IDRRef
LEFT OUTER JOIN _Document30907 T724
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\273::bytea AND T1._Fld22706_RRRef = T724._IDRRef) AND (T724._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T726._Marked AS Marked_,
T726._IDRRef AS IDRRef,
T726._Fld41086RRef AS Fld41086RRef,
T726._Fld1194 AS Fld1194_
FROM _Reference40939 T726
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document40942 T727
ON (T726._Fld41086RRef = T727._IDRRef) AND (T727._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T728
INNER JOIN _Reference79 T729
ON (T728._Fld2999 = Справочник.ИзвещениеФССПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T730
WHERE ((T730._Fld1194 = CAST(0 AS NUMERIC))) AND ((T730._Fld26433_TYPE = \\010::bytea AND T730._Fld26433_RTRef = \\000\\000\\000j::bytea AND T730._Fld26433_RRRef = T728._IDRRef) AND (T730._Fld26434RRef = T729._IDRRef))) AND T729._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T729._Fld1194 = CAST(0 AS NUMERIC))) AND (((T727._Fld40952RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T733
WHERE ((T733._Fld1194 = CAST(0 AS NUMERIC))) AND ((T733._Fld22973RRef = T729._IDRRef) AND (T733._Fld22974_TYPE = \\010::bytea AND T733._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T733._Fld22974_RRRef = T727._Fld40952RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T734
WHERE ((T734._Fld1194 = CAST(0 AS NUMERIC))) AND ((T734._Fld22980RRef = T729._IDRRef) AND T734._Fld22981_TYPE = CASE WHEN T727._Fld40952RRef IS NOT NULL THEN \\010::bytea END AND T734._Fld22981_RTRef = CASE WHEN T727._Fld40952RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T734._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T727._Fld40962RRef IS NOT NULL))))))) AND (T726._Fld1194 = CAST(0 AS NUMERIC))) T725
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\353::bytea AND T1._Fld22706_RRRef = T725.IDRRef
LEFT OUTER JOIN _Document455 T735
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\307::bytea AND T1._Fld22706_RRRef = T735._IDRRef) AND (T735._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document45531 T736
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\333::bytea AND T1._Fld22706_RRRef = T736._IDRRef) AND (T736._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T738._Marked AS Marked_,
T738._IDRRef AS IDRRef,
T738._Fld13075RRef AS Fld13075RRef,
T738._Fld1194 AS Fld1194_
FROM _Document454 T738
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T739
INNER JOIN _Reference79 T740
ON (T739._Fld2999 = Документ.НачислениеОценочныхОбязательствПоОтпускам::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T741
WHERE ((T741._Fld1194 = CAST(0 AS NUMERIC))) AND ((T741._Fld26433_TYPE = \\010::bytea AND T741._Fld26433_RTRef = \\000\\000\\000j::bytea AND T741._Fld26433_RRRef = T739._IDRRef) AND (T741._Fld26434RRef = T740._IDRRef))) AND T740._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T740._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document454_VT13140 T744
WHERE ((T744._Fld1194 = CAST(0 AS NUMERIC))) AND ((T738._IDRRef = T744._Document454_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T745
WHERE ((T745._Fld1194 = CAST(0 AS NUMERIC))) AND ((T745._Fld22973RRef = T740._IDRRef) AND (T745._Fld22974_TYPE = \\010::bytea AND T745._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T745._Fld22974_RRRef = T738._Fld13075RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T746
WHERE ((T746._Fld1194 = CAST(0 AS NUMERIC))) AND ((T746._Fld22980RRef = T740._IDRRef) AND T746._Fld22981_TYPE = \\010::bytea AND T746._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T746._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T738._Fld1194 = CAST(0 AS NUMERIC))) T737
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\306::bytea AND T1._Fld22706_RRRef = T737.IDRRef
LEFT OUTER JOIN (SELECT
T748._Marked AS Marked_,
T748._IDRRef AS IDRRef,
T748._Fld39253RRef AS Fld39253RRef,
T748._Fld1194 AS Fld1194_
FROM _Reference38857 T748
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document38861 T749
ON (T748._Fld39253RRef = T749._IDRRef) AND (T749._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T750
INNER JOIN _Reference79 T751
ON (T750._Fld2999 = Справочник.ОтзывЗаявленийОПредоставленииСведенийОТрудовойДеятельностиПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T752
WHERE ((T752._Fld1194 = CAST(0 AS NUMERIC))) AND ((T752._Fld26433_TYPE = \\010::bytea AND T752._Fld26433_RTRef = \\000\\000\\000j::bytea AND T752._Fld26433_RRRef = T750._IDRRef) AND (T752._Fld26434RRef = T751._IDRRef))) AND T751._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T751._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document38861_VT38895 T755
WHERE ((T755._Fld1194 = CAST(0 AS NUMERIC))) AND ((T748._Fld39253RRef = T755._Document38861_IDRRef) AND (NOT (((1=1))))))))) AND ((T749._Fld38891RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T756
WHERE ((T756._Fld1194 = CAST(0 AS NUMERIC))) AND ((T756._Fld22973RRef = T751._IDRRef) AND (T756._Fld22974_TYPE = \\010::bytea AND T756._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T756._Fld22974_RRRef = T749._Fld38891RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T757
WHERE ((T757._Fld1194 = CAST(0 AS NUMERIC))) AND ((T757._Fld22980RRef = T751._IDRRef) AND T757._Fld22981_TYPE = CASE WHEN T749._Fld38891RRef IS NOT NULL THEN \\010::bytea END AND T757._Fld22981_RTRef = CASE WHEN T749._Fld38891RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T757._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T748._Fld1194 = CAST(0 AS NUMERIC))) T747
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\311::bytea AND T1._Fld22706_RRRef = T747.IDRRef
LEFT OUTER JOIN _Reference143 T758
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\217::bytea AND T1._Fld22706_RRRef = T758._IDRRef) AND (T758._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference44383 T759
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255_::bytea AND T1._Fld22706_RRRef = T759._IDRRef) AND (T759._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference42831 T760
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\247O::bytea AND T1._Fld22706_RRRef = T760._IDRRef
LEFT OUTER JOIN _Reference298 T761
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001*::bytea AND T1._Fld22706_RRRef = T761._IDRRef
LEFT OUTER JOIN (SELECT
T763._Marked AS Marked_,
T763._IDRRef AS IDRRef,
T763._Fld2797RRef AS Fld2797RRef,
T763._Fld1194 AS Fld1194_
FROM _Reference99 T763
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document418 T764
ON (T763._Fld2797RRef = T764._IDRRef) AND (T764._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T765
INNER JOIN _Reference79 T766
ON (T765._Fld2999 = Справочник.ЗаявкаНаЗакрытиеЛицевыхСчетовСотрудниковПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T767
WHERE ((T767._Fld1194 = CAST(0 AS NUMERIC))) AND ((T767._Fld26433_TYPE = \\010::bytea AND T767._Fld26433_RTRef = \\000\\000\\000j::bytea AND T767._Fld26433_RRRef = T765._IDRRef) AND (T767._Fld26434RRef = T766._IDRRef))) AND T766._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T766._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document418_VT11530 T770
WHERE ((T770._Fld1194 = CAST(0 AS NUMERIC))) AND ((T763._Fld2797RRef = T770._Document418_IDRRef) AND (NOT (((1=1))))))))) AND ((T764._Fld11523RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T771
WHERE ((T771._Fld1194 = CAST(0 AS NUMERIC))) AND ((T771._Fld22973RRef = T766._IDRRef) AND (T771._Fld22974_TYPE = \\010::bytea AND T771._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T771._Fld22974_RRRef = T764._Fld11523RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T772
WHERE ((T772._Fld1194 = CAST(0 AS NUMERIC))) AND ((T772._Fld22980RRef = T766._IDRRef) AND T772._Fld22981_TYPE = CASE WHEN T764._Fld11523RRef IS NOT NULL THEN \\010::bytea END AND T772._Fld22981_RTRef = CASE WHEN T764._Fld11523RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T772._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T763._Fld1194 = CAST(0 AS NUMERIC))) T762
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000c::bytea AND T1._Fld22706_RRRef = T762.IDRRef
LEFT OUTER JOIN (SELECT
T774._OwnerIDRRef AS OwnerIDRRef,
T774._Marked AS Marked_,
T774._IDRRef AS IDRRef,
T774._Fld1194 AS Fld1194_
FROM _Reference56 T774
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T775
INNER JOIN _Reference79 T776
ON (T775._Fld2999 = Справочник.ВидыДеятельностиЕНВД::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T777
WHERE ((T777._Fld1194 = CAST(0 AS NUMERIC))) AND ((T777._Fld26433_TYPE = \\010::bytea AND T777._Fld26433_RTRef = \\000\\000\\000j::bytea AND T777._Fld26433_RRRef = T775._IDRRef) AND (T777._Fld26434RRef = T776._IDRRef))) AND T776._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T776._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T780
WHERE ((T780._Fld1194 = CAST(0 AS NUMERIC))) AND ((T780._Fld22973RRef = T776._IDRRef) AND (T780._Fld22974_TYPE = \\010::bytea AND T780._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T780._Fld22974_RRRef = T774._OwnerIDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T781
WHERE ((T781._Fld1194 = CAST(0 AS NUMERIC))) AND ((T781._Fld22980RRef = T776._IDRRef) AND T781._Fld22981_TYPE = \\010::bytea AND T781._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T781._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T774._Fld1194 = CAST(0 AS NUMERIC))) T773
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0008::bytea AND T1._Fld22706_RRRef = T773.IDRRef
LEFT OUTER JOIN _Document45544 T782
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\350::bytea AND T1._Fld22706_RRRef = T782._IDRRef) AND (T782._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document45605 T783
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262%::bytea AND T1._Fld22706_RRRef = T783._IDRRef) AND (T783._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference84 T784
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000T::bytea AND T1._Fld22706_RRRef = T784._IDRRef) AND (T784._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference130 T785
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\202::bytea AND T1._Fld22706_RRRef = T785._IDRRef) AND (T785._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T787._Marked AS Marked_,
T787._IDRRef AS IDRRef,
T787._Fld40402RRef AS Fld40402RRef,
T787._Fld1194 AS Fld1194_
FROM _Document40370 T787
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T788
INNER JOIN _Reference79 T789
ON (T788._Fld2999 = Документ.ФинОтчетВБанк::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T790
WHERE ((T790._Fld1194 = CAST(0 AS NUMERIC))) AND ((T790._Fld26433_TYPE = \\010::bytea AND T790._Fld26433_RTRef = \\000\\000\\000j::bytea AND T790._Fld26433_RRRef = T788._IDRRef) AND (T790._Fld26434RRef = T789._IDRRef))) AND T789._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T789._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T793
WHERE ((T793._Fld1194 = CAST(0 AS NUMERIC))) AND ((T793._Fld22973RRef = T789._IDRRef) AND (T793._Fld22974_TYPE = \\010::bytea AND T793._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T793._Fld22974_RRRef = T787._Fld40402RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T794
WHERE ((T794._Fld1194 = CAST(0 AS NUMERIC))) AND ((T794._Fld22980RRef = T789._IDRRef) AND T794._Fld22981_TYPE = \\010::bytea AND T794._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T794._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T787._Fld1194 = CAST(0 AS NUMERIC))) T786
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\235\\262::bytea AND T1._Fld22706_RRRef = T786.IDRRef
LEFT OUTER JOIN _Reference86 T795
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000V::bytea AND T1._Fld22706_RRRef = T795._IDRRef) AND (T795._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference97 T796
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000a::bytea AND T1._Fld22706_RRRef = T796._IDRRef
LEFT OUTER JOIN (SELECT
T798._Marked AS Marked_,
T798._IDRRef AS IDRRef,
T798._Fld16552RRef AS Fld16552RRef,
T798._Fld1194 AS Fld1194_
FROM _Document527 T798
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T799
INNER JOIN _Reference79 T800
ON (T799._Fld2999 = Документ.РасходныйКассовыйОрдер::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T801
WHERE ((T801._Fld1194 = CAST(0 AS NUMERIC))) AND ((T801._Fld26433_TYPE = \\010::bytea AND T801._Fld26433_RTRef = \\000\\000\\000j::bytea AND T801._Fld26433_RRRef = T799._IDRRef) AND (T801._Fld26434RRef = T800._IDRRef))) AND T800._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T800._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T804
WHERE ((T804._Fld1194 = CAST(0 AS NUMERIC))) AND ((T804._Fld22973RRef = T800._IDRRef) AND (T804._Fld22974_TYPE = \\010::bytea AND T804._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T804._Fld22974_RRRef = T798._Fld16552RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T805
WHERE ((T805._Fld1194 = CAST(0 AS NUMERIC))) AND ((T805._Fld22980RRef = T800._IDRRef) AND T805._Fld22981_TYPE = \\010::bytea AND T805._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T805._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T798._Fld1194 = CAST(0 AS NUMERIC))) T797
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\017::bytea AND T1._Fld22706_RRRef = T797.IDRRef
LEFT OUTER JOIN (SELECT
T807._Marked AS Marked_,
T807._IDRRef AS IDRRef,
T807._Fld33165RRef AS Fld33165RRef,
T807._Fld1194 AS Fld1194_
FROM _Reference32743 T807
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T808
INNER JOIN _Reference79 T809
ON (T808._Fld2999 = Справочник.Билеты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T810
WHERE ((T810._Fld1194 = CAST(0 AS NUMERIC))) AND ((T810._Fld26433_TYPE = \\010::bytea AND T810._Fld26433_RTRef = \\000\\000\\000j::bytea AND T810._Fld26433_RRRef = T808._IDRRef) AND (T810._Fld26434RRef = T809._IDRRef))) AND T809._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T809._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T813
WHERE ((T813._Fld1194 = CAST(0 AS NUMERIC))) AND ((T813._Fld22973RRef = T809._IDRRef) AND (T813._Fld22974_TYPE = \\010::bytea AND T813._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T813._Fld22974_RRRef = T807._Fld33165RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T814
WHERE ((T814._Fld1194 = CAST(0 AS NUMERIC))) AND ((T814._Fld22980RRef = T809._IDRRef) AND T814._Fld22981_TYPE = \\010::bytea AND T814._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T814._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T807._Fld1194 = CAST(0 AS NUMERIC))) T806
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\347::bytea AND T1._Fld22706_RRRef = T806.IDRRef
LEFT OUTER JOIN (SELECT
T816._Marked AS Marked_,
T816._IDRRef AS IDRRef,
T816._Fld34337RRef AS Fld34337RRef,
T816._Fld1194 AS Fld1194_
FROM _Reference34044 T816
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document406 T817
ON (T816._Fld34337RRef = T817._IDRRef) AND (T817._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T818
INNER JOIN _Reference79 T819
ON (T818._Fld2999 = Справочник.ДепонированиеЗарплатыПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T820
WHERE ((T820._Fld1194 = CAST(0 AS NUMERIC))) AND ((T820._Fld26433_TYPE = \\010::bytea AND T820._Fld26433_RTRef = \\000\\000\\000j::bytea AND T820._Fld26433_RRRef = T818._IDRRef) AND (T820._Fld26434RRef = T819._IDRRef))) AND T819._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T819._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document406_VT11079 T823
WHERE ((T823._Fld1194 = CAST(0 AS NUMERIC))) AND ((T816._Fld34337RRef = T823._Document406_IDRRef) AND (NOT (((1=1))))))))) AND ((T817._Fld11071RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T824
WHERE ((T824._Fld1194 = CAST(0 AS NUMERIC))) AND ((T824._Fld22973RRef = T819._IDRRef) AND (T824._Fld22974_TYPE = \\010::bytea AND T824._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T824._Fld22974_RRRef = T817._Fld11071RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T825
WHERE ((T825._Fld1194 = CAST(0 AS NUMERIC))) AND ((T825._Fld22980RRef = T819._IDRRef) AND T825._Fld22981_TYPE = CASE WHEN T817._Fld11071RRef IS NOT NULL THEN \\010::bytea END AND T825._Fld22981_RTRef = CASE WHEN T817._Fld11071RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T825._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T816._Fld1194 = CAST(0 AS NUMERIC))) T815
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\374::bytea AND T1._Fld22706_RRRef = T815.IDRRef
LEFT OUTER JOIN _Reference291 T826
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001#::bytea AND T1._Fld22706_RRRef = T826._IDRRef) AND (T826._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document629 T827
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002u::bytea AND T1._Fld22706_RRRef = T827._IDRRef) AND (T827._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T829._Marked AS Marked_,
T829._IDRRef AS IDRRef,
T829._Fld9520RRef AS Fld9520RRef,
T829._Fld1194 AS Fld1194_
FROM _Document382 T829
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T830
INNER JOIN _Reference79 T831
ON (T830._Fld2999 = Документ.АктСверкиВзаиморасчетов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T832
WHERE ((T832._Fld1194 = CAST(0 AS NUMERIC))) AND ((T832._Fld26433_TYPE = \\010::bytea AND T832._Fld26433_RTRef = \\000\\000\\000j::bytea AND T832._Fld26433_RRRef = T830._IDRRef) AND (T832._Fld26434RRef = T831._IDRRef))) AND T831._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T831._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T835
WHERE ((T835._Fld1194 = CAST(0 AS NUMERIC))) AND ((T835._Fld22973RRef = T831._IDRRef) AND (T835._Fld22974_TYPE = \\010::bytea AND T835._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T835._Fld22974_RRRef = T829._Fld9520RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T836
WHERE ((T836._Fld1194 = CAST(0 AS NUMERIC))) AND ((T836._Fld22980RRef = T831._IDRRef) AND T836._Fld22981_TYPE = \\010::bytea AND T836._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T836._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T829._Fld1194 = CAST(0 AS NUMERIC))) T828
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001~::bytea AND T1._Fld22706_RRRef = T828.IDRRef
LEFT OUTER JOIN _Reference45285 T837
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\345::bytea AND T1._Fld22706_RRRef = T837._IDRRef) AND (T837._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference72 T838
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000H::bytea AND T1._Fld22706_RRRef = T838._IDRRef) AND (T838._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference76 T839
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000L::bytea AND T1._Fld22706_RRRef = T839._IDRRef) AND (T839._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T841._Marked AS Marked_,
T841._IDRRef AS IDRRef,
T841._Fld2942RRef AS Fld2942RRef,
T841._Fld1194 AS Fld1194_
FROM _Reference102 T841
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document425 T842
ON (T841._Fld2942RRef = T842._IDRRef) AND (T842._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T843
INNER JOIN _Reference79 T844
ON (T843._Fld2999 = Справочник.ЗаявлениеОПодтвержденииПраваНаЗачетАвансовПоНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T845
WHERE ((T845._Fld1194 = CAST(0 AS NUMERIC))) AND ((T845._Fld26433_TYPE = \\010::bytea AND T845._Fld26433_RTRef = \\000\\000\\000j::bytea AND T845._Fld26433_RRRef = T843._IDRRef) AND (T845._Fld26434RRef = T844._IDRRef))) AND T844._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T844._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document425_VT11907 T848
WHERE ((T848._Fld1194 = CAST(0 AS NUMERIC))) AND ((T841._Fld2942RRef = T848._Document425_IDRRef) AND (NOT (((1=1))))))))) AND ((T842._Fld11895RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T849
WHERE ((T849._Fld1194 = CAST(0 AS NUMERIC))) AND ((T849._Fld22973RRef = T844._IDRRef) AND (T849._Fld22974_TYPE = \\010::bytea AND T849._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T849._Fld22974_RRRef = T842._Fld11895RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T850
WHERE ((T850._Fld1194 = CAST(0 AS NUMERIC))) AND ((T850._Fld22980RRef = T844._IDRRef) AND T850._Fld22981_TYPE = CASE WHEN T842._Fld11895RRef IS NOT NULL THEN \\010::bytea END AND T850._Fld22981_RTRef = CASE WHEN T842._Fld11895RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T850._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T841._Fld1194 = CAST(0 AS NUMERIC))) T840
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000f::bytea AND T1._Fld22706_RRRef = T840.IDRRef
LEFT OUTER JOIN _Reference272 T851
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\020::bytea AND T1._Fld22706_RRRef = T851._IDRRef) AND (T851._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference154 T852
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\232::bytea AND T1._Fld22706_RRRef = T852._IDRRef) AND (T852._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T854._Marked AS Marked_,
T854._IDRRef AS IDRRef,
T854._Fld17548RRef AS Fld17548RRef,
T854._Fld1194 AS Fld1194_
FROM _Document549 T854
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T855
INNER JOIN _Reference79 T856
ON (T855._Fld2999 = Документ.СписаниеДепонированнойЗарплаты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T857
WHERE ((T857._Fld1194 = CAST(0 AS NUMERIC))) AND ((T857._Fld26433_TYPE = \\010::bytea AND T857._Fld26433_RTRef = \\000\\000\\000j::bytea AND T857._Fld26433_RRRef = T855._IDRRef) AND (T857._Fld26434RRef = T856._IDRRef))) AND T856._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T856._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document549_VT17555 T860
WHERE ((T860._Fld1194 = CAST(0 AS NUMERIC))) AND ((T854._IDRRef = T860._Document549_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T861
WHERE ((T861._Fld1194 = CAST(0 AS NUMERIC))) AND ((T861._Fld22973RRef = T856._IDRRef) AND (T861._Fld22974_TYPE = \\010::bytea AND T861._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T861._Fld22974_RRRef = T854._Fld17548RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T862
WHERE ((T862._Fld1194 = CAST(0 AS NUMERIC))) AND ((T862._Fld22980RRef = T856._IDRRef) AND T862._Fld22981_TYPE = \\010::bytea AND T862._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T862._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T854._Fld1194 = CAST(0 AS NUMERIC))) T853
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002%::bytea AND T1._Fld22706_RRRef = T853.IDRRef
LEFT OUTER JOIN (SELECT
T864._Marked AS Marked_,
T864._IDRRef AS IDRRef,
T864._Fld13209RRef AS Fld13209RRef,
T864._Fld1194 AS Fld1194_
FROM _Document457 T864
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T865
INNER JOIN _Reference79 T866
ON (T865._Fld2999 = Документ.ОперацияБух::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T867
WHERE ((T867._Fld1194 = CAST(0 AS NUMERIC))) AND ((T867._Fld26433_TYPE = \\010::bytea AND T867._Fld26433_RTRef = \\000\\000\\000j::bytea AND T867._Fld26433_RRRef = T865._IDRRef) AND (T867._Fld26434RRef = T866._IDRRef))) AND T866._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T866._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T870
WHERE ((T870._Fld1194 = CAST(0 AS NUMERIC))) AND ((T870._Fld22973RRef = T866._IDRRef) AND (T870._Fld22974_TYPE = \\010::bytea AND T870._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T870._Fld22974_RRRef = T864._Fld13209RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T871
WHERE ((T871._Fld1194 = CAST(0 AS NUMERIC))) AND ((T871._Fld22980RRef = T866._IDRRef) AND T871._Fld22981_TYPE = \\010::bytea AND T871._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T871._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T864._Fld1194 = CAST(0 AS NUMERIC))) T863
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\311::bytea AND T1._Fld22706_RRRef = T863.IDRRef
LEFT OUTER JOIN _Document624 T872
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002p::bytea AND T1._Fld22706_RRRef = T872._IDRRef) AND (T872._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference270 T873
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\016::bytea AND T1._Fld22706_RRRef = T873._IDRRef) AND (T873._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T875._Marked AS Marked_,
T875._IDRRef AS IDRRef,
T875._Fld34831RRef AS Fld34831RRef,
T875._Fld1194 AS Fld1194_
FROM _Reference34057 T875
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document467 T876
ON (T875._Fld34831RRef = T876._IDRRef) AND (T876._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T877
INNER JOIN _Reference79 T878
ON (T877._Fld2999 = Справочник.ОтпускПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T879
WHERE ((T879._Fld1194 = CAST(0 AS NUMERIC))) AND ((T879._Fld26433_TYPE = \\010::bytea AND T879._Fld26433_RTRef = \\000\\000\\000j::bytea AND T879._Fld26433_RRRef = T877._IDRRef) AND (T879._Fld26434RRef = T878._IDRRef))) AND T878._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T878._Fld1194 = CAST(0 AS NUMERIC))) AND (((T876._Fld13528RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T882
WHERE ((T882._Fld1194 = CAST(0 AS NUMERIC))) AND ((T882._Fld22973RRef = T878._IDRRef) AND (T882._Fld22974_TYPE = \\010::bytea AND T882._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T882._Fld22974_RRRef = T876._Fld13528RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T883
WHERE ((T883._Fld1194 = CAST(0 AS NUMERIC))) AND ((T883._Fld22980RRef = T878._IDRRef) AND T883._Fld22981_TYPE = CASE WHEN T876._Fld13528RRef IS NOT NULL THEN \\010::bytea END AND T883._Fld22981_RTRef = CASE WHEN T876._Fld13528RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T883._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T876._Fld13530RRef IS NOT NULL))))))) AND (T875._Fld1194 = CAST(0 AS NUMERIC))) T874
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\011::bytea AND T1._Fld22706_RRRef = T874.IDRRef
LEFT OUTER JOIN _Document592 T884
ON ((T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002P::bytea AND T1._Fld22706_RRRef = T884._IDRRef) AND (T884._Fld1194 = CAST(0 AS NUMERIC))) AND (1=0)
LEFT OUTER JOIN _Reference236 T885
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\354::bytea AND T1._Fld22706_RRRef = T885._IDRRef) AND (T885._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T887._Marked AS Marked_,
T887._IDRRef AS IDRRef,
T887._Fld34641RRef AS Fld34641RRef,
T887._Fld1194 AS Fld1194_
FROM _Reference34052 T887
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document454 T888
ON (T887._Fld34641RRef = T888._IDRRef) AND (T888._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T889
INNER JOIN _Reference79 T890
ON (T889._Fld2999 = Справочник.НачислениеОценочныхОбязательствПоОтпускамПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T891
WHERE ((T891._Fld1194 = CAST(0 AS NUMERIC))) AND ((T891._Fld26433_TYPE = \\010::bytea AND T891._Fld26433_RTRef = \\000\\000\\000j::bytea AND T891._Fld26433_RRRef = T889._IDRRef) AND (T891._Fld26434RRef = T890._IDRRef))) AND T890._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T890._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document454_VT13140 T894
WHERE ((T894._Fld1194 = CAST(0 AS NUMERIC))) AND ((T887._Fld34641RRef = T894._Document454_IDRRef) AND (NOT (((1=1))))))))) AND ((T888._Fld13075RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T895
WHERE ((T895._Fld1194 = CAST(0 AS NUMERIC))) AND ((T895._Fld22973RRef = T890._IDRRef) AND (T895._Fld22974_TYPE = \\010::bytea AND T895._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T895._Fld22974_RRRef = T888._Fld13075RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T896
WHERE ((T896._Fld1194 = CAST(0 AS NUMERIC))) AND ((T896._Fld22980RRef = T890._IDRRef) AND T896._Fld22981_TYPE = CASE WHEN T888._Fld13075RRef IS NOT NULL THEN \\010::bytea END AND T896._Fld22981_RTRef = CASE WHEN T888._Fld13075RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T896._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T887._Fld1194 = CAST(0 AS NUMERIC))) T886
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\004::bytea AND T1._Fld22706_RRRef = T886.IDRRef
LEFT OUTER JOIN _Reference80 T897
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000P::bytea AND T1._Fld22706_RRRef = T897._IDRRef) AND (T897._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T899._Marked AS Marked_,
T899._IDRRef AS IDRRef,
T899._Fld37542RRef AS Fld37542RRef,
T899._Fld1194 AS Fld1194_
FROM _Document37387 T899
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T900
INNER JOIN _Reference79 T901
ON (T900._Fld2999 = Документ.ПутевойЛист::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T902
WHERE ((T902._Fld1194 = CAST(0 AS NUMERIC))) AND ((T902._Fld26433_TYPE = \\010::bytea AND T902._Fld26433_RTRef = \\000\\000\\000j::bytea AND T902._Fld26433_RRRef = T900._IDRRef) AND (T902._Fld26434RRef = T901._IDRRef))) AND T901._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T901._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T905
WHERE ((T905._Fld1194 = CAST(0 AS NUMERIC))) AND ((T905._Fld22973RRef = T901._IDRRef) AND (T905._Fld22974_TYPE = \\010::bytea AND T905._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T905._Fld22974_RRRef = T899._Fld37542RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T906
WHERE ((T906._Fld1194 = CAST(0 AS NUMERIC))) AND ((T906._Fld22980RRef = T901._IDRRef) AND T906._Fld22981_TYPE = \\010::bytea AND T906._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T906._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T899._Fld1194 = CAST(0 AS NUMERIC))) T898
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\013::bytea AND T1._Fld22706_RRRef = T898.IDRRef
LEFT OUTER JOIN (SELECT
T908._Marked AS Marked_,
T908._IDRRef AS IDRRef,
T908._Fld14219RRef AS Fld14219RRef,
T908._Fld1194 AS Fld1194_
FROM _Document478 T908
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T909
INNER JOIN _Reference79 T910
ON (T909._Fld2999 = Документ.ТранспортныйКонтейнерЭДО::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T911
WHERE ((T911._Fld1194 = CAST(0 AS NUMERIC))) AND ((T911._Fld26433_TYPE = \\010::bytea AND T911._Fld26433_RTRef = \\000\\000\\000j::bytea AND T911._Fld26433_RRRef = T909._IDRRef) AND (T911._Fld26434RRef = T910._IDRRef))) AND T910._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T910._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T914
WHERE ((T914._Fld1194 = CAST(0 AS NUMERIC))) AND ((T914._Fld22973RRef = T910._IDRRef) AND (T914._Fld22974_TYPE = \\010::bytea AND T914._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T914._Fld22974_RRRef = T908._Fld14219RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T915
WHERE ((T915._Fld1194 = CAST(0 AS NUMERIC))) AND ((T915._Fld22980RRef = T910._IDRRef) AND T915._Fld22981_TYPE = \\010::bytea AND T915._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T915._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T908._Fld1194 = CAST(0 AS NUMERIC))) T907
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\336::bytea AND T1._Fld22706_RRRef = T907.IDRRef
LEFT OUTER JOIN (SELECT
T917._Marked AS Marked_,
T917._IDRRef AS IDRRef,
T917._Fld47175RRef AS Fld47175RRef,
T917._Fld1194 AS Fld1194_
FROM _Document45541 T917
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T918
ON ((T918._Fld4110RRef = T917._Fld47175RRef) AND (T918._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR (T918._IDRRef = T917._Fld47175RRef)) AND (T918._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T919
INNER JOIN _Reference79 T920
ON (T919._Fld2999 = Документ.ВерсияСоглашенияВалютныйСвоп::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T921
WHERE ((T921._Fld1194 = CAST(0 AS NUMERIC))) AND ((T921._Fld26433_TYPE = \\010::bytea AND T921._Fld26433_RTRef = \\000\\000\\000j::bytea AND T921._Fld26433_RRRef = T919._IDRRef) AND (T921._Fld26434RRef = T920._IDRRef))) AND T920._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T920._Fld1194 = CAST(0 AS NUMERIC))) AND (((T918._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T924
WHERE ((T924._Fld1194 = CAST(0 AS NUMERIC))) AND ((T924._Fld22973RRef = T920._IDRRef) AND (T924._Fld22974_TYPE = \\010::bytea AND T924._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T924._Fld22974_RRRef = T918._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T925
WHERE ((T925._Fld1194 = CAST(0 AS NUMERIC))) AND ((T925._Fld22980RRef = T920._IDRRef) AND T925._Fld22981_TYPE = CASE WHEN T918._IDRRef IS NOT NULL THEN \\010::bytea END AND T925._Fld22981_RTRef = CASE WHEN T918._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T925._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T917._Fld1194 = CAST(0 AS NUMERIC))) T916
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\345::bytea AND T1._Fld22706_RRRef = T916.IDRRef
LEFT OUTER JOIN _Reference274 T926
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\022::bytea AND T1._Fld22706_RRRef = T926._IDRRef) AND (T926._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference127 T927
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\177::bytea AND T1._Fld22706_RRRef = T927._IDRRef) AND (T927._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T929._Marked AS Marked_,
T929._IDRRef AS IDRRef,
T929._Fld18250RRef AS Fld18250RRef,
T929._Fld1194 AS Fld1194_
FROM _Document561 T929
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T930
INNER JOIN _Reference79 T931
ON (T930._Fld2999 = Документ.СчетНаОплатуПоставщика::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T932
WHERE ((T932._Fld1194 = CAST(0 AS NUMERIC))) AND ((T932._Fld26433_TYPE = \\010::bytea AND T932._Fld26433_RTRef = \\000\\000\\000j::bytea AND T932._Fld26433_RRRef = T930._IDRRef) AND (T932._Fld26434RRef = T931._IDRRef))) AND T931._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T931._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T935
WHERE ((T935._Fld1194 = CAST(0 AS NUMERIC))) AND ((T935._Fld22973RRef = T931._IDRRef) AND (T935._Fld22974_TYPE = \\010::bytea AND T935._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T935._Fld22974_RRRef = T929._Fld18250RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T936
WHERE ((T936._Fld1194 = CAST(0 AS NUMERIC))) AND ((T936._Fld22980RRef = T931._IDRRef) AND T936._Fld22981_TYPE = \\010::bytea AND T936._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T936._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T929._Fld1194 = CAST(0 AS NUMERIC))) T928
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0021::bytea AND T1._Fld22706_RRRef = T928.IDRRef
LEFT OUTER JOIN _Reference187 T937
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\273::bytea AND T1._Fld22706_RRRef = T937._IDRRef) AND (T937._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T939._Marked AS Marked_,
T939._IDRRef AS IDRRef,
T939._Fld14500RRef AS Fld14500RRef,
T939._Fld1194 AS Fld1194_
FROM _Document487 T939
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T940
INNER JOIN _Reference79 T941
ON (T940._Fld2999 = Документ.ПачкаДокументовСЗВ_6_4::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T942
WHERE ((T942._Fld1194 = CAST(0 AS NUMERIC))) AND ((T942._Fld26433_TYPE = \\010::bytea AND T942._Fld26433_RTRef = \\000\\000\\000j::bytea AND T942._Fld26433_RRRef = T940._IDRRef) AND (T942._Fld26434RRef = T941._IDRRef))) AND T941._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T941._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document487_VT14568 T945
WHERE ((T945._Fld1194 = CAST(0 AS NUMERIC))) AND ((T939._IDRRef = T945._Document487_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T946
WHERE ((T946._Fld1194 = CAST(0 AS NUMERIC))) AND ((T946._Fld22973RRef = T941._IDRRef) AND (T946._Fld22974_TYPE = \\010::bytea AND T946._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T946._Fld22974_RRRef = T939._Fld14500RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T947
WHERE ((T947._Fld1194 = CAST(0 AS NUMERIC))) AND ((T947._Fld22980RRef = T941._IDRRef) AND T947._Fld22981_TYPE = \\010::bytea AND T947._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T947._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T939._Fld1194 = CAST(0 AS NUMERIC))) T938
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\347::bytea AND T1._Fld22706_RRRef = T938.IDRRef
LEFT OUTER JOIN _Document37386 T948
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\012::bytea AND T1._Fld22706_RRRef = T948._IDRRef) AND (T948._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document568 T949
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0028::bytea AND T1._Fld22706_RRRef = T949._IDRRef) AND (T949._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference148 T950
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\224::bytea AND T1._Fld22706_RRRef = T950._IDRRef) AND (T950._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference30902 T951
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\266::bytea AND T1._Fld22706_RRRef = T951._IDRRef) AND (T951._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T953._Marked AS Marked_,
T953._IDRRef AS IDRRef,
T953._Fld3211RRef AS Fld3211RRef,
T953._Fld1194 AS Fld1194_
FROM _Reference123 T953
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T954
INNER JOIN _Reference79 T955
ON (T954._Fld2999 = Справочник.КомплектыОтчетностиПерсУчета::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T956
WHERE ((T956._Fld1194 = CAST(0 AS NUMERIC))) AND ((T956._Fld26433_TYPE = \\010::bytea AND T956._Fld26433_RTRef = \\000\\000\\000j::bytea AND T956._Fld26433_RRRef = T954._IDRRef) AND (T956._Fld26434RRef = T955._IDRRef))) AND T955._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T955._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T959
WHERE ((T959._Fld1194 = CAST(0 AS NUMERIC))) AND ((T959._Fld22973RRef = T955._IDRRef) AND (T959._Fld22974_TYPE = \\010::bytea AND T959._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T959._Fld22974_RRRef = T953._Fld3211RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T960
WHERE ((T960._Fld1194 = CAST(0 AS NUMERIC))) AND ((T960._Fld22980RRef = T955._IDRRef) AND T960._Fld22981_TYPE = \\010::bytea AND T960._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T960._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T953._Fld1194 = CAST(0 AS NUMERIC))) T952
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000{::bytea AND T1._Fld22706_RRRef = T952.IDRRef
LEFT OUTER JOIN _Reference39721 T961
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\233)::bytea AND T1._Fld22706_RRRef = T961._IDRRef) AND (T961._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T963._Marked AS Marked_,
T963._IDRRef AS IDRRef,
T963._Fld34755RRef AS Fld34755RRef,
T963._Fld1194 AS Fld1194_
FROM _Reference34055 T963
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document460 T964
ON (T963._Fld34755RRef = T964._IDRRef) AND (T964._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T965
INNER JOIN _Reference79 T966
ON (T965._Fld2999 = Справочник.ОписьЗаявленийСотрудниковНаВыплатуПособийПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T967
WHERE ((T967._Fld1194 = CAST(0 AS NUMERIC))) AND ((T967._Fld26433_TYPE = \\010::bytea AND T967._Fld26433_RTRef = \\000\\000\\000j::bytea AND T967._Fld26433_RRRef = T965._IDRRef) AND (T967._Fld26434RRef = T966._IDRRef))) AND T966._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T966._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document460_VT13376 T970
WHERE ((T970._Fld1194 = CAST(0 AS NUMERIC))) AND ((T963._Fld34755RRef = T970._Document460_IDRRef) AND (NOT (((1=1))))))))) AND ((T964._Fld13357RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T971
WHERE ((T971._Fld1194 = CAST(0 AS NUMERIC))) AND ((T971._Fld22973RRef = T966._IDRRef) AND (T971._Fld22974_TYPE = \\010::bytea AND T971._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T971._Fld22974_RRRef = T964._Fld13357RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T972
WHERE ((T972._Fld1194 = CAST(0 AS NUMERIC))) AND ((T972._Fld22980RRef = T966._IDRRef) AND T972._Fld22981_TYPE = CASE WHEN T964._Fld13357RRef IS NOT NULL THEN \\010::bytea END AND T972._Fld22981_RTRef = CASE WHEN T964._Fld13357RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T972._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T963._Fld1194 = CAST(0 AS NUMERIC))) T962
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\007::bytea AND T1._Fld22706_RRRef = T962.IDRRef
LEFT OUTER JOIN _Reference245 T973
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\365::bytea AND T1._Fld22706_RRRef = T973._IDRRef) AND (T973._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference57 T974
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0009::bytea AND T1._Fld22706_RRRef = T974._IDRRef) AND (T974._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference276 T975
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\024::bytea AND T1._Fld22706_RRRef = T975._IDRRef) AND (T975._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T977._Marked AS Marked_,
T977._IDRRef AS IDRRef,
T977._Fld34299RRef AS Fld34299RRef,
T977._Fld1194 AS Fld1194_
FROM _Reference34043 T977
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document392 T978
ON (T977._Fld34299RRef = T978._IDRRef) AND (T978._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T979
INNER JOIN _Reference79 T980
ON (T979._Fld2999 = Справочник.ВозвратНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T981
WHERE ((T981._Fld1194 = CAST(0 AS NUMERIC))) AND ((T981._Fld26433_TYPE = \\010::bytea AND T981._Fld26433_RTRef = \\000\\000\\000j::bytea AND T981._Fld26433_RRRef = T979._IDRRef) AND (T981._Fld26434RRef = T980._IDRRef))) AND T980._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T980._Fld1194 = CAST(0 AS NUMERIC))) AND (((T978._Fld10515RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T984
WHERE ((T984._Fld1194 = CAST(0 AS NUMERIC))) AND ((T984._Fld22973RRef = T980._IDRRef) AND (T984._Fld22974_TYPE = \\010::bytea AND T984._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T984._Fld22974_RRRef = T978._Fld10515RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T985
WHERE ((T985._Fld1194 = CAST(0 AS NUMERIC))) AND ((T985._Fld22980RRef = T980._IDRRef) AND T985._Fld22981_TYPE = CASE WHEN T978._Fld10515RRef IS NOT NULL THEN \\010::bytea END AND T985._Fld22981_RTRef = CASE WHEN T978._Fld10515RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T985._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T978._Fld10516RRef IS NOT NULL))))))) AND (T977._Fld1194 = CAST(0 AS NUMERIC))) T976
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\373::bytea AND T1._Fld22706_RRRef = T976.IDRRef
LEFT OUTER JOIN _Reference45501 T986
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\275::bytea AND T1._Fld22706_RRRef = T986._IDRRef) AND (T986._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference111 T987
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000o::bytea AND T1._Fld22706_RRRef = T987._IDRRef
LEFT OUTER JOIN _Reference45453 T988
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\215::bytea AND T1._Fld22706_RRRef = T988._IDRRef) AND (T988._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T990._Marked AS Marked_,
T990._IDRRef AS IDRRef,
T990._Fld38905RRef AS Fld38905RRef,
T990._Fld1194 AS Fld1194_
FROM _Document38862 T990
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T991
INNER JOIN _Reference79 T992
ON (T991._Fld2999 = Документ.РегистрацияТрудовойДеятельности::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T993
WHERE ((T993._Fld1194 = CAST(0 AS NUMERIC))) AND ((T993._Fld26433_TYPE = \\010::bytea AND T993._Fld26433_RTRef = \\000\\000\\000j::bytea AND T993._Fld26433_RRRef = T991._IDRRef) AND (T993._Fld26434RRef = T992._IDRRef))) AND T992._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T992._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document38862_VT38909 T996
WHERE ((T996._Fld1194 = CAST(0 AS NUMERIC))) AND ((T990._IDRRef = T996._Document38862_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T997
WHERE ((T997._Fld1194 = CAST(0 AS NUMERIC))) AND ((T997._Fld22973RRef = T992._IDRRef) AND (T997._Fld22974_TYPE = \\010::bytea AND T997._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T997._Fld22974_RRRef = T990._Fld38905RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T998
WHERE ((T998._Fld1194 = CAST(0 AS NUMERIC))) AND ((T998._Fld22980RRef = T992._IDRRef) AND T998._Fld22981_TYPE = \\010::bytea AND T998._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T998._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T990._Fld1194 = CAST(0 AS NUMERIC))) T989
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\316::bytea AND T1._Fld22706_RRRef = T989.IDRRef
LEFT OUTER JOIN _Reference30820 T999
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000xd::bytea AND T1._Fld22706_RRRef = T999._IDRRef) AND (T999._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1001._Marked AS Marked_,
T1001._IDRRef AS IDRRef,
T1001._Fld15204RRef AS Fld15204RRef,
T1001._Fld1194 AS Fld1194_
FROM _Document504 T1001
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1002
INNER JOIN _Reference79 T1003
ON (T1002._Fld2999 = Документ.ПерерасчетСтраховыхВзносов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1004
WHERE ((T1004._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1004._Fld26433_TYPE = \\010::bytea AND T1004._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1004._Fld26433_RRRef = T1002._IDRRef) AND (T1004._Fld26434RRef = T1003._IDRRef))) AND T1003._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1003._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document504_VT15265 T1007
WHERE ((T1007._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1001._IDRRef = T1007._Document504_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1008
WHERE ((T1008._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1008._Fld22973RRef = T1003._IDRRef) AND (T1008._Fld22974_TYPE = \\010::bytea AND T1008._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1008._Fld22974_RRRef = T1001._Fld15204RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1009
WHERE ((T1009._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1009._Fld22980RRef = T1003._IDRRef) AND T1009._Fld22981_TYPE = \\010::bytea AND T1009._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1009._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1001._Fld1194 = CAST(0 AS NUMERIC))) T1000
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\370::bytea AND T1._Fld22706_RRRef = T1000.IDRRef
LEFT OUTER JOIN _Reference45389 T1010
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261M::bytea AND T1._Fld22706_RRRef = T1010._IDRRef) AND (T1010._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1012._Marked AS Marked_,
T1012._IDRRef AS IDRRef,
T1012._Fld12424RRef AS Fld12424RRef,
T1012._Fld1194 AS Fld1194_
FROM _Document444 T1012
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1013
INNER JOIN _Reference79 T1014
ON (T1013._Fld2999 = Документ.КнигаПокупокДляПередачиВЭлектронномВиде::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1015
WHERE ((T1015._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1015._Fld26433_TYPE = \\010::bytea AND T1015._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1015._Fld26433_RRRef = T1013._IDRRef) AND (T1015._Fld26434RRef = T1014._IDRRef))) AND T1014._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1014._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1018
WHERE ((T1018._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1018._Fld22973RRef = T1014._IDRRef) AND (T1018._Fld22974_TYPE = \\010::bytea AND T1018._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1018._Fld22974_RRRef = T1012._Fld12424RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1019
WHERE ((T1019._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1019._Fld22980RRef = T1014._IDRRef) AND T1019._Fld22981_TYPE = \\010::bytea AND T1019._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1019._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1012._Fld1194 = CAST(0 AS NUMERIC))) T1011
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\274::bytea AND T1._Fld22706_RRRef = T1011.IDRRef
LEFT OUTER JOIN (SELECT
T1021._Marked AS Marked_,
T1021._IDRRef AS IDRRef,
T1021._Fld14327RRef AS Fld14327RRef,
T1021._Fld1194 AS Fld1194_
FROM _Document483 T1021
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1022
INNER JOIN _Reference79 T1023
ON (T1022._Fld2999 = Документ.ПачкаДокументовАДВ_3::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1024
WHERE ((T1024._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1024._Fld26433_TYPE = \\010::bytea AND T1024._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1024._Fld26433_RRRef = T1022._IDRRef) AND (T1024._Fld26434RRef = T1023._IDRRef))) AND T1023._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1023._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document483_VT14339 T1027
WHERE ((T1027._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1021._IDRRef = T1027._Document483_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1028
WHERE ((T1028._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1028._Fld22973RRef = T1023._IDRRef) AND (T1028._Fld22974_TYPE = \\010::bytea AND T1028._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1028._Fld22974_RRRef = T1021._Fld14327RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1029
WHERE ((T1029._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1029._Fld22980RRef = T1023._IDRRef) AND T1029._Fld22981_TYPE = \\010::bytea AND T1029._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1029._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1021._Fld1194 = CAST(0 AS NUMERIC))) T1020
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\343::bytea AND T1._Fld22706_RRRef = T1020.IDRRef
LEFT OUTER JOIN _Reference45284 T1030
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\344::bytea AND T1._Fld22706_RRRef = T1030._IDRRef) AND (T1030._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference149 T1031
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\225::bytea AND T1._Fld22706_RRRef = T1031._IDRRef
LEFT OUTER JOIN _Reference225 T1032
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\341::bytea AND T1._Fld22706_RRRef = T1032._IDRRef) AND (T1032._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1034._Marked AS Marked_,
T1034._IDRRef AS IDRRef,
T1034._Fld14855RRef AS Fld14855RRef,
T1034._Fld1194 AS Fld1194_
FROM _Document493 T1034
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1035
INNER JOIN _Reference79 T1036
ON (T1035._Fld2999 = Документ.ПередачаЗадолженностиНаФакторинг::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1037
WHERE ((T1037._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1037._Fld26433_TYPE = \\010::bytea AND T1037._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1037._Fld26433_RRRef = T1035._IDRRef) AND (T1037._Fld26434RRef = T1036._IDRRef))) AND T1036._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1036._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1040
WHERE ((T1040._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1040._Fld22973RRef = T1036._IDRRef) AND (T1040._Fld22974_TYPE = \\010::bytea AND T1040._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1040._Fld22974_RRRef = T1034._Fld14855RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1041
WHERE ((T1041._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1041._Fld22980RRef = T1036._IDRRef) AND T1041._Fld22981_TYPE = \\010::bytea AND T1041._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1041._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1034._Fld1194 = CAST(0 AS NUMERIC))) T1033
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\355::bytea AND T1._Fld22706_RRRef = T1033.IDRRef
LEFT OUTER JOIN _Reference45289 T1042
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\351::bytea AND T1._Fld22706_RRRef = T1042._IDRRef) AND (T1042._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45394 T1043
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261R::bytea AND T1._Fld22706_RRRef = T1043._IDRRef) AND (T1043._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45486 T1044
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\256::bytea AND T1._Fld22706_RRRef = T1044._IDRRef) AND (T1044._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1046._Marked AS Marked_,
T1046._IDRRef AS IDRRef,
T1046._Fld14574RRef AS Fld14574RRef,
T1046._Fld1194 AS Fld1194_
FROM _Document488 T1046
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1047
INNER JOIN _Reference79 T1048
ON (T1047._Fld2999 = Документ.ПачкаДокументовСЗВ_К::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1049
WHERE ((T1049._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1049._Fld26433_TYPE = \\010::bytea AND T1049._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1049._Fld26433_RRRef = T1047._IDRRef) AND (T1049._Fld26434RRef = T1048._IDRRef))) AND T1048._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1048._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document488_VT14637 T1052
WHERE ((T1052._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1046._IDRRef = T1052._Document488_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1053
WHERE ((T1053._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1053._Fld22973RRef = T1048._IDRRef) AND (T1053._Fld22974_TYPE = \\010::bytea AND T1053._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1053._Fld22974_RRRef = T1046._Fld14574RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1054
WHERE ((T1054._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1054._Fld22980RRef = T1048._IDRRef) AND T1054._Fld22981_TYPE = \\010::bytea AND T1054._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1054._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1046._Fld1194 = CAST(0 AS NUMERIC))) T1045
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\350::bytea AND T1._Fld22706_RRRef = T1045.IDRRef
LEFT OUTER JOIN (SELECT
T1056._Marked AS Marked_,
T1056._IDRRef AS IDRRef,
T1056._Fld1194 AS Fld1194_,
T1056._Fld11772RRef AS Fld11772RRef
FROM _Document422 T1056
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1057
INNER JOIN _Reference79 T1058
ON (T1057._Fld2999 = Документ.ЗаявлениеВФССОВозмещенииРасходовНаПогребение::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1059
WHERE ((T1059._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1059._Fld26433_TYPE = \\010::bytea AND T1059._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1059._Fld26433_RRRef = T1057._IDRRef) AND (T1059._Fld26434RRef = T1058._IDRRef))) AND T1058._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1058._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document422_VT11793 T1062
WHERE ((T1062._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1056._IDRRef = T1062._Document422_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1063
WHERE ((T1063._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1063._Fld22973RRef = T1058._IDRRef) AND (T1063._Fld22974_TYPE = \\010::bytea AND T1063._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1063._Fld22974_RRRef = T1056._Fld11772RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1064
WHERE ((T1064._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1064._Fld22980RRef = T1058._IDRRef) AND T1064._Fld22981_TYPE = \\010::bytea AND T1064._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1064._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1056._Fld1194 = CAST(0 AS NUMERIC))) T1055
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\246::bytea AND T1._Fld22706_RRRef = T1055.IDRRef
LEFT OUTER JOIN (SELECT
T1066._Marked AS Marked_,
T1066._IDRRef AS IDRRef,
T1066._Fld14700RRef AS Fld14700RRef,
T1066._Fld1194 AS Fld1194_
FROM _Document490 T1066
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1067
INNER JOIN _Reference79 T1068
ON (T1067._Fld2999 = Документ.ПачкаДокументовСПВ_2::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1069
WHERE ((T1069._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1069._Fld26433_TYPE = \\010::bytea AND T1069._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1069._Fld26433_RRRef = T1067._IDRRef) AND (T1069._Fld26434RRef = T1068._IDRRef))) AND T1068._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1068._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document490_VT14748 T1072
WHERE ((T1072._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1066._IDRRef = T1072._Document490_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1073
WHERE ((T1073._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1073._Fld22973RRef = T1068._IDRRef) AND (T1073._Fld22974_TYPE = \\010::bytea AND T1073._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1073._Fld22974_RRRef = T1066._Fld14700RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1074
WHERE ((T1074._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1074._Fld22980RRef = T1068._IDRRef) AND T1074._Fld22981_TYPE = \\010::bytea AND T1074._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1074._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1066._Fld1194 = CAST(0 AS NUMERIC))) T1065
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\352::bytea AND T1._Fld22706_RRRef = T1065.IDRRef
LEFT OUTER JOIN _Document380 T1075
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001|::bytea AND T1._Fld22706_RRRef = T1075._IDRRef) AND (T1075._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference59 T1076
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000;::bytea AND T1._Fld22706_RRRef = T1076._IDRRef
LEFT OUTER JOIN _Reference177 T1077
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\261::bytea AND T1._Fld22706_RRRef = T1077._IDRRef) AND (T1077._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1079._Marked AS Marked_,
T1079._IDRRef AS IDRRef,
T1079._Fld15452RRef AS Fld15452RRef,
T1079._Fld1194 AS Fld1194_
FROM _Document513 T1079
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1080
INNER JOIN _Reference79 T1081
ON (T1080._Fld2999 = Документ.ПоступлениеДенежныхДокументов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1082
WHERE ((T1082._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1082._Fld26433_TYPE = \\010::bytea AND T1082._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1082._Fld26433_RRRef = T1080._IDRRef) AND (T1082._Fld26434RRef = T1081._IDRRef))) AND T1081._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1081._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1085
WHERE ((T1085._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1085._Fld22973RRef = T1081._IDRRef) AND (T1085._Fld22974_TYPE = \\010::bytea AND T1085._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1085._Fld22974_RRRef = T1079._Fld15452RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1086
WHERE ((T1086._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1086._Fld22980RRef = T1081._IDRRef) AND T1086._Fld22981_TYPE = \\010::bytea AND T1086._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1086._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1079._Fld1194 = CAST(0 AS NUMERIC))) T1078
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\001::bytea AND T1._Fld22706_RRRef = T1078.IDRRef
LEFT OUTER JOIN _Reference37381 T1087
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\005::bytea AND T1._Fld22706_RRRef = T1087._IDRRef) AND (T1087._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference299 T1088
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001+::bytea AND T1._Fld22706_RRRef = T1088._IDRRef) AND (T1088._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1090._Marked AS Marked_,
T1090._IDRRef AS IDRRef,
T1090._Fld38891RRef AS Fld38891RRef,
T1090._Fld1194 AS Fld1194_
FROM _Document38861 T1090
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1091
INNER JOIN _Reference79 T1092
ON (T1091._Fld2999 = Документ.ОтзывЗаявленийОПредоставленииСведенийОТрудовойДеятельности::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1093
WHERE ((T1093._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1093._Fld26433_TYPE = \\010::bytea AND T1093._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1093._Fld26433_RRRef = T1091._IDRRef) AND (T1093._Fld26434RRef = T1092._IDRRef))) AND T1092._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1092._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document38861_VT38895 T1096
WHERE ((T1096._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1090._IDRRef = T1096._Document38861_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1097
WHERE ((T1097._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1097._Fld22973RRef = T1092._IDRRef) AND (T1097._Fld22974_TYPE = \\010::bytea AND T1097._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1097._Fld22974_RRRef = T1090._Fld38891RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1098
WHERE ((T1098._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1098._Fld22980RRef = T1092._IDRRef) AND T1098._Fld22981_TYPE = \\010::bytea AND T1098._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1098._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1090._Fld1194 = CAST(0 AS NUMERIC))) T1089
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\315::bytea AND T1._Fld22706_RRRef = T1089.IDRRef
LEFT OUTER JOIN (SELECT
T1100._Marked AS Marked_,
T1100._IDRRef AS IDRRef,
T1100._Fld9368RRef AS Fld9368RRef,
T1100._Fld1194 AS Fld1194_
FROM _Document379 T1100
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1101
INNER JOIN _Reference79 T1102
ON (T1101._Fld2999 = Документ.АктОбОказанииПроизводственныхУслуг::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1103
WHERE ((T1103._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1103._Fld26433_TYPE = \\010::bytea AND T1103._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1103._Fld26433_RRRef = T1101._IDRRef) AND (T1103._Fld26434RRef = T1102._IDRRef))) AND T1102._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1102._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1106
WHERE ((T1106._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1106._Fld22973RRef = T1102._IDRRef) AND (T1106._Fld22974_TYPE = \\010::bytea AND T1106._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1106._Fld22974_RRRef = T1100._Fld9368RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1107
WHERE ((T1107._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1107._Fld22980RRef = T1102._IDRRef) AND T1107._Fld22981_TYPE = \\010::bytea AND T1107._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1107._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1100._Fld1194 = CAST(0 AS NUMERIC))) T1099
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001{::bytea AND T1._Fld22706_RRRef = T1099.IDRRef
LEFT OUTER JOIN (SELECT
T1109._OwnerIDRRef AS OwnerIDRRef,
T1109._Marked AS Marked_,
T1109._IDRRef AS IDRRef,
T1109._Fld1194 AS Fld1194_
FROM _Reference105 T1109
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Chrc1185 T1110
ON (T1109._OwnerIDRRef = T1110._IDRRef) AND (T1110._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1111
INNER JOIN _Reference79 T1112
ON (T1111._Fld2999 = Справочник.ЗначенияСвойствОбъектовИерархия::mvarchar) AND EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg26432 T1113
WHERE ((T1113._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1113._Fld26433_TYPE = \\010::bytea AND T1113._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1113._Fld26433_RRRef = T1111._IDRRef) AND (T1113._Fld26434RRef = T1112._IDRRef))) AND T1112._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1112._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) OR (T1110._Fld29281 = FALSE)))))) AND (T1109._Fld1194 = CAST(0 AS NUMERIC))) T1108
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000i::bytea AND T1._Fld22706_RRRef = T1108.IDRRef
LEFT OUTER JOIN (SELECT
T1117._Marked AS Marked_,
T1117._IDRRef AS IDRRef,
T1117._Fld20596RRef AS Fld20596RRef,
T1117._Fld1194 AS Fld1194_
FROM _Document623 T1117
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1118
INNER JOIN _Reference79 T1119
ON (T1118._Fld2999 = Документ.УстановкаПорядкаЗакрытияПодразделений::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1120
WHERE ((T1120._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1120._Fld26433_TYPE = \\010::bytea AND T1120._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1120._Fld26433_RRRef = T1118._IDRRef) AND (T1120._Fld26434RRef = T1119._IDRRef))) AND T1119._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1119._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1123
WHERE ((T1123._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1123._Fld22973RRef = T1119._IDRRef) AND (T1123._Fld22974_TYPE = \\010::bytea AND T1123._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1123._Fld22974_RRRef = T1117._Fld20596RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1124
WHERE ((T1124._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1124._Fld22980RRef = T1119._IDRRef) AND T1124._Fld22981_TYPE = \\010::bytea AND T1124._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1124._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1117._Fld1194 = CAST(0 AS NUMERIC))) T1116
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002o::bytea AND T1._Fld22706_RRRef = T1116.IDRRef
LEFT OUTER JOIN _Reference45451 T1125
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\213::bytea AND T1._Fld22706_RRRef = T1125._IDRRef) AND (T1125._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference285 T1126
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\035::bytea AND T1._Fld22706_RRRef = T1126._IDRRef) AND (T1126._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1128._Marked AS Marked_,
T1128._IDRRef AS IDRRef,
T1128._Fld12355RRef AS Fld12355RRef,
T1128._Fld12352RRef AS Fld12352RRef,
T1128._Fld1194 AS Fld1194_
FROM _Document441 T1128
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1129
INNER JOIN _Reference79 T1130
ON (T1129._Fld2999 = Документ.КадровыйПеревод::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1131
WHERE ((T1131._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1131._Fld26433_TYPE = \\010::bytea AND T1131._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1131._Fld26433_RRRef = T1129._IDRRef) AND (T1131._Fld26434RRef = T1130._IDRRef))) AND T1130._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1130._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1134
WHERE ((T1134._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1134._Fld22973RRef = T1130._IDRRef) AND (T1134._Fld22974_TYPE = \\010::bytea AND T1134._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1134._Fld22974_RRRef = T1128._Fld12352RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1135
WHERE ((T1135._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1135._Fld22980RRef = T1130._IDRRef) AND T1135._Fld22981_TYPE = \\010::bytea AND T1135._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1135._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1128._Fld1194 = CAST(0 AS NUMERIC))) T1127
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\271::bytea AND T1._Fld22706_RRRef = T1127.IDRRef
LEFT OUTER JOIN (SELECT
T1137._Marked AS Marked_,
T1137._IDRRef AS IDRRef,
T1137._Fld9052RRef AS Fld9052RRef,
T1137._Fld9047RRef AS Fld9047RRef,
T1137._Fld1194 AS Fld1194_
FROM _Document371 T1137
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1138
INNER JOIN _Reference79 T1139
ON (T1138._Fld2999 = Документ.АвизоМПЗВходящее::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T1140
WHERE ((T1140._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1140._Fld26433_TYPE = \\010::bytea AND T1140._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1140._Fld26433_RRRef = T1138._IDRRef) AND (T1140._Fld26434RRef = T1139._IDRRef))) AND T1139._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1139._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1143
WHERE ((T1143._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1143._Fld22973RRef = T1139._IDRRef) AND (T1143._Fld22974_TYPE = \\010::bytea AND T1143._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1143._Fld22974_RRRef = T1137._Fld9047RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1144
WHERE ((T1144._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1144._Fld22980RRef = T1139._IDRRef) AND T1144._Fld22981_TYPE = \\010::bytea AND T1144._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1144._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T1145
WHERE ((T1145._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1145._Fld22973RRef = T1139._IDRRef) AND (T1145._Fld22974_TYPE = \\010::bytea AND T1145._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1145._Fld22974_RRRef = T1137._Fld9052RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T1146
WHERE ((T1146._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1146._Fld22980RRef = T1139._IDRRef) AND T1146._Fld22981_TYPE = \\010::bytea AND T1146._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1146._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1137._Fld1194 = CAST(0 AS NUMERIC))) T1136
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001s::bytea AND T1._Fld22706_RRRef = T1136.IDRRef
LEFT OUTER JOIN (SELECT
T1148._Marked AS Marked_,
T1148._IDRRef AS IDRRef,
T1148._Fld49396RRef AS Fld49396RRef,
T1148._Fld1194 AS Fld1194_
FROM _Document45578 T1148
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1149
INNER JOIN _Reference79 T1150
ON (T1149._Fld2999 = Документ.НачисленияПоФинансовымИнструментам::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1151
WHERE ((T1151._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1151._Fld26433_TYPE = \\010::bytea AND T1151._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1151._Fld26433_RRRef = T1149._IDRRef) AND (T1151._Fld26434RRef = T1150._IDRRef))) AND T1150._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1150._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1154
WHERE ((T1154._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1154._Fld22973RRef = T1150._IDRRef) AND (T1154._Fld22974_TYPE = \\010::bytea AND T1154._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1154._Fld22974_RRRef = T1148._Fld49396RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1155
WHERE ((T1155._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1155._Fld22980RRef = T1150._IDRRef) AND T1155._Fld22981_TYPE = \\010::bytea AND T1155._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1155._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1148._Fld1194 = CAST(0 AS NUMERIC))) T1147
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262\\012::bytea AND T1._Fld22706_RRRef = T1147.IDRRef
LEFT OUTER JOIN (SELECT
T1157._Marked AS Marked_,
T1157._IDRRef AS IDRRef,
T1157._Fld39592RRef AS Fld39592RRef,
T1157._Fld1194 AS Fld1194_
FROM _Reference39482 T1157
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1158
INNER JOIN _Reference79 T1159
ON (T1158._Fld2999 = Справочник.ФизическиеЛицаПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg26432 T1160
WHERE ((T1160._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1160._Fld26433_TYPE = \\010::bytea AND T1160._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1160._Fld26433_RRRef = T1158._IDRRef) AND (T1160._Fld26434RRef = T1159._IDRRef))) AND T1159._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1159._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1))))) AND (T1157._Fld1194 = CAST(0 AS NUMERIC))) T1156
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\232:::bytea AND T1._Fld22706_RRRef = T1156.IDRRef
LEFT OUTER JOIN _Reference45476 T1163
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\244::bytea AND T1._Fld22706_RRRef = T1163._IDRRef) AND (T1163._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document45551 T1164
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\357::bytea AND T1._Fld22706_RRRef = T1164._IDRRef) AND (T1164._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45447 T1165
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\207::bytea AND T1._Fld22706_RRRef = T1165._IDRRef) AND (T1165._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference357 T1166
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001e::bytea AND T1._Fld22706_RRRef = T1166._IDRRef) AND (T1166._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference296 T1167
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001(::bytea AND T1._Fld22706_RRRef = T1167._IDRRef) AND (T1167._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference181 T1168
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\265::bytea AND T1._Fld22706_RRRef = T1168._IDRRef) AND (T1168._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference240 T1169
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\360::bytea AND T1._Fld22706_RRRef = T1169._IDRRef) AND (T1169._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1171._Marked AS Marked_,
T1171._IDRRef AS IDRRef,
T1171._Fld34679RRef AS Fld34679RRef,
T1171._Fld1194 AS Fld1194_
FROM _Reference34053 T1171
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document458 T1172
ON (T1171._Fld34679RRef = T1172._IDRRef) AND (T1172._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1173
INNER JOIN _Reference79 T1174
ON (T1173._Fld2999 = Справочник.ОперацияНалоговогоУчетаПоНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1175
WHERE ((T1175._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1175._Fld26433_TYPE = \\010::bytea AND T1175._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1175._Fld26433_RRRef = T1173._IDRRef) AND (T1175._Fld26434RRef = T1174._IDRRef))) AND T1174._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1174._Fld1194 = CAST(0 AS NUMERIC))) AND (((T1172._Fld13227RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1178
WHERE ((T1178._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1178._Fld22973RRef = T1174._IDRRef) AND (T1178._Fld22974_TYPE = \\010::bytea AND T1178._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1178._Fld22974_RRRef = T1172._Fld13227RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1179
WHERE ((T1179._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1179._Fld22980RRef = T1174._IDRRef) AND T1179._Fld22981_TYPE = CASE WHEN T1172._Fld13227RRef IS NOT NULL THEN \\010::bytea END AND T1179._Fld22981_RTRef = CASE WHEN T1172._Fld13227RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1179._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T1172._Fld13228RRef IS NOT NULL))))))) AND (T1171._Fld1194 = CAST(0 AS NUMERIC))) T1170
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\005::bytea AND T1._Fld22706_RRRef = T1170.IDRRef
LEFT OUTER JOIN _Reference293 T1180
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001%::bytea AND T1._Fld22706_RRRef = T1180._IDRRef
LEFT OUTER JOIN (SELECT
T1182._Marked AS Marked_,
T1182._IDRRef AS IDRRef,
T1182._Fld15704RRef AS Fld15704RRef,
T1182._Fld1194 AS Fld1194_
FROM _Document517 T1182
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1183
INNER JOIN _Reference79 T1184
ON (T1183._Fld2999 = Документ.ПоступлениеНМА::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1185
WHERE ((T1185._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1185._Fld26433_TYPE = \\010::bytea AND T1185._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1185._Fld26433_RRRef = T1183._IDRRef) AND (T1185._Fld26434RRef = T1184._IDRRef))) AND T1184._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1184._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1188
WHERE ((T1188._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1188._Fld22973RRef = T1184._IDRRef) AND (T1188._Fld22974_TYPE = \\010::bytea AND T1188._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1188._Fld22974_RRRef = T1182._Fld15704RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1189
WHERE ((T1189._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1189._Fld22980RRef = T1184._IDRRef) AND T1189._Fld22981_TYPE = \\010::bytea AND T1189._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1189._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1182._Fld1194 = CAST(0 AS NUMERIC))) T1181
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\005::bytea AND T1._Fld22706_RRRef = T1181.IDRRef
LEFT OUTER JOIN _Reference45311 T1190
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\377::bytea AND T1._Fld22706_RRRef = T1190._IDRRef) AND (T1190._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1192._Marked AS Marked_,
T1192._IDRRef AS IDRRef,
T1192._Fld13228RRef AS Fld13228RRef,
T1192._Fld13227RRef AS Fld13227RRef,
T1192._Fld1194 AS Fld1194_
FROM _Document458 T1192
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1193
INNER JOIN _Reference79 T1194
ON (T1193._Fld2999 = Документ.ОперацияНалоговогоУчетаПоНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1195
WHERE ((T1195._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1195._Fld26433_TYPE = \\010::bytea AND T1195._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1195._Fld26433_RRRef = T1193._IDRRef) AND (T1195._Fld26434RRef = T1194._IDRRef))) AND T1194._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1194._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1198
WHERE ((T1198._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1198._Fld22973RRef = T1194._IDRRef) AND (T1198._Fld22974_TYPE = \\010::bytea AND T1198._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1198._Fld22974_RRRef = T1192._Fld13227RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1199
WHERE ((T1199._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1199._Fld22980RRef = T1194._IDRRef) AND T1199._Fld22981_TYPE = \\010::bytea AND T1199._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1199._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1192._Fld1194 = CAST(0 AS NUMERIC))) T1191
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\312::bytea AND T1._Fld22706_RRRef = T1191.IDRRef
LEFT OUTER JOIN (SELECT
T1201._Marked AS Marked_,
T1201._IDRRef AS IDRRef,
T1201._Fld12596RRef AS Fld12596RRef,
T1201._Fld1194 AS Fld1194_
FROM _Document448 T1201
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1202
INNER JOIN _Reference79 T1203
ON (T1202._Fld2999 = Документ.КорректировкаДолга::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1204
WHERE ((T1204._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1204._Fld26433_TYPE = \\010::bytea AND T1204._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1204._Fld26433_RRRef = T1202._IDRRef) AND (T1204._Fld26434RRef = T1203._IDRRef))) AND T1203._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1203._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1207
WHERE ((T1207._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1207._Fld22973RRef = T1203._IDRRef) AND (T1207._Fld22974_TYPE = \\010::bytea AND T1207._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1207._Fld22974_RRRef = T1201._Fld12596RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1208
WHERE ((T1208._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1208._Fld22980RRef = T1203._IDRRef) AND T1208._Fld22981_TYPE = \\010::bytea AND T1208._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1208._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1201._Fld1194 = CAST(0 AS NUMERIC))) T1200
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\300::bytea AND T1._Fld22706_RRRef = T1200.IDRRef
LEFT OUTER JOIN (SELECT
T1210._Marked AS Marked_,
T1210._IDRRef AS IDRRef,
T1210._Fld13677RRef AS Fld13677RRef,
T1210._Fld1194 AS Fld1194_
FROM _Document469X1 T1210
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1211
INNER JOIN _Reference79 T1212
ON (T1211._Fld2999 = Документ.ОтражениеЗарплатыВУчете::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1213
WHERE ((T1213._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1213._Fld26433_TYPE = \\010::bytea AND T1213._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1213._Fld26433_RRRef = T1211._IDRRef) AND (T1213._Fld26434RRef = T1212._IDRRef))) AND T1212._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1212._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1216
WHERE ((T1216._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1216._Fld22973RRef = T1212._IDRRef) AND (T1216._Fld22974_TYPE = \\010::bytea AND T1216._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1216._Fld22974_RRRef = T1210._Fld13677RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1217
WHERE ((T1217._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1217._Fld22980RRef = T1212._IDRRef) AND T1217._Fld22981_TYPE = \\010::bytea AND T1217._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1217._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1210._Fld1194 = CAST(0 AS NUMERIC))) T1209
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\325::bytea AND T1._Fld22706_RRRef = T1209.IDRRef
LEFT OUTER JOIN _Reference115 T1218
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000s::bytea AND T1._Fld22706_RRRef = T1218._IDRRef) AND (T1218._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1220._Marked AS Marked_,
T1220._IDRRef AS IDRRef,
T1220._Fld15750RRef AS Fld15750RRef,
T1220._Fld1194 AS Fld1194_
FROM _Document518X1 T1220
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1221
INNER JOIN _Reference79 T1222
ON (T1221._Fld2999 = Документ.ПоступлениеТоваровУслуг::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1223
WHERE ((T1223._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1223._Fld26433_TYPE = \\010::bytea AND T1223._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1223._Fld26433_RRRef = T1221._IDRRef) AND (T1223._Fld26434RRef = T1222._IDRRef))) AND T1222._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1222._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1226
WHERE ((T1226._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1226._Fld22973RRef = T1222._IDRRef) AND (T1226._Fld22974_TYPE = \\010::bytea AND T1226._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1226._Fld22974_RRRef = T1220._Fld15750RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1227
WHERE ((T1227._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1227._Fld22980RRef = T1222._IDRRef) AND T1227._Fld22981_TYPE = \\010::bytea AND T1227._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1227._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1220._Fld1194 = CAST(0 AS NUMERIC))) T1219
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\006::bytea AND T1._Fld22706_RRRef = T1219.IDRRef
LEFT OUTER JOIN _Reference93 T1228
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000]::bytea AND T1._Fld22706_RRRef = T1228._IDRRef) AND (T1228._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45429 T1229
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261u::bytea AND T1._Fld22706_RRRef = T1229._IDRRef) AND (T1229._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1231._Marked AS Marked_,
T1231._IDRRef AS IDRRef,
T1231._Fld1194 AS Fld1194_,
T1231._Fld11731RRef AS Fld11731RRef
FROM _Document421 T1231
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1232
INNER JOIN _Reference79 T1233
ON (T1232._Fld2999 = Документ.ЗаявлениеВФССОВозмещенииВыплатРодителямДетейИнвалидов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1234
WHERE ((T1234._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1234._Fld26433_TYPE = \\010::bytea AND T1234._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1234._Fld26433_RRRef = T1232._IDRRef) AND (T1234._Fld26434RRef = T1233._IDRRef))) AND T1233._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1233._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document421_VT11766 T1237
WHERE ((T1237._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1231._IDRRef = T1237._Document421_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1238
WHERE ((T1238._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1238._Fld22973RRef = T1233._IDRRef) AND (T1238._Fld22974_TYPE = \\010::bytea AND T1238._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1238._Fld22974_RRRef = T1231._Fld11731RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1239
WHERE ((T1239._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1239._Fld22980RRef = T1233._IDRRef) AND T1239._Fld22981_TYPE = \\010::bytea AND T1239._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1239._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1231._Fld1194 = CAST(0 AS NUMERIC))) T1230
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\245::bytea AND T1._Fld22706_RRRef = T1230.IDRRef
LEFT OUTER JOIN _Reference45419 T1240
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261k::bytea AND T1._Fld22706_RRRef = T1240._IDRRef) AND (T1240._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45282 T1241
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\342::bytea AND T1._Fld22706_RRRef = T1241._IDRRef) AND (T1241._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1243._Marked AS Marked_,
T1243._IDRRef AS IDRRef,
T1243._Fld13172RRef AS Fld13172RRef,
T1243._Fld1194 AS Fld1194_
FROM _Document456 T1243
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1244
INNER JOIN _Reference79 T1245
ON (T1244._Fld2999 = Документ.ОказаниеУслуг::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1246
WHERE ((T1246._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1246._Fld26433_TYPE = \\010::bytea AND T1246._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1246._Fld26433_RRRef = T1244._IDRRef) AND (T1246._Fld26434RRef = T1245._IDRRef))) AND T1245._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1245._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1249
WHERE ((T1249._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1249._Fld22973RRef = T1245._IDRRef) AND (T1249._Fld22974_TYPE = \\010::bytea AND T1249._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1249._Fld22974_RRRef = T1243._Fld13172RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1250
WHERE ((T1250._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1250._Fld22980RRef = T1245._IDRRef) AND T1250._Fld22981_TYPE = \\010::bytea AND T1250._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1250._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1243._Fld1194 = CAST(0 AS NUMERIC))) T1242
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\310::bytea AND T1._Fld22706_RRRef = T1242.IDRRef
LEFT OUTER JOIN (SELECT
T1252._Marked AS Marked_,
T1252._IDRRef AS IDRRef,
T1252._Fld15017RRef AS Fld15017RRef,
T1252._Fld1194 AS Fld1194_
FROM _Document498 T1252
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1253
INNER JOIN _Reference79 T1254
ON (T1253._Fld2999 = Документ.ПередачаОСВАренду::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1255
WHERE ((T1255._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1255._Fld26433_TYPE = \\010::bytea AND T1255._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1255._Fld26433_RRRef = T1253._IDRRef) AND (T1255._Fld26434RRef = T1254._IDRRef))) AND T1254._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1254._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1258
WHERE ((T1258._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1258._Fld22973RRef = T1254._IDRRef) AND (T1258._Fld22974_TYPE = \\010::bytea AND T1258._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1258._Fld22974_RRRef = T1252._Fld15017RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1259
WHERE ((T1259._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1259._Fld22980RRef = T1254._IDRRef) AND T1259._Fld22981_TYPE = \\010::bytea AND T1259._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1259._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1252._Fld1194 = CAST(0 AS NUMERIC))) T1251
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\362::bytea AND T1._Fld22706_RRRef = T1251.IDRRef
LEFT OUTER JOIN _Reference150 T1260
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\226::bytea AND T1._Fld22706_RRRef = T1260._IDRRef) AND (T1260._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1262._Marked AS Marked_,
T1262._IDRRef AS IDRRef,
T1262._Fld18725RRef AS Fld18725RRef,
T1262._Fld1194 AS Fld1194_
FROM _Document570 T1262
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1263
INNER JOIN _Reference79 T1264
ON (T1263._Fld2999 = Документ.УведомлениеОбОтгрузкеМаркированныхТоваровГИСМ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1265
WHERE ((T1265._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1265._Fld26433_TYPE = \\010::bytea AND T1265._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1265._Fld26433_RRRef = T1263._IDRRef) AND (T1265._Fld26434RRef = T1264._IDRRef))) AND T1264._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1264._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1268
WHERE ((T1268._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1268._Fld22973RRef = T1264._IDRRef) AND (T1268._Fld22974_TYPE = \\010::bytea AND T1268._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1268._Fld22974_RRRef = T1262._Fld18725RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1269
WHERE ((T1269._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1269._Fld22980RRef = T1264._IDRRef) AND T1269._Fld22981_TYPE = \\010::bytea AND T1269._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1269._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1262._Fld1194 = CAST(0 AS NUMERIC))) T1261
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002:::bytea AND T1._Fld22706_RRRef = T1261.IDRRef
LEFT OUTER JOIN _Reference131 T1270
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\203::bytea AND T1._Fld22706_RRRef = T1270._IDRRef
LEFT OUTER JOIN (SELECT
T1272._Marked AS Marked_,
T1272._IDRRef AS IDRRef,
T1272._Fld17510RRef AS Fld17510RRef,
T1272._Fld17507RRef AS Fld17507RRef,
T1272._Fld1194 AS Fld1194_
FROM _Document547 T1272
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1273
INNER JOIN _Reference79 T1274
ON (T1273._Fld2999 = Документ.СогласиеНаОбработкуПерсональныхДанных::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1275
WHERE ((T1275._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1275._Fld26433_TYPE = \\010::bytea AND T1275._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1275._Fld26433_RRRef = T1273._IDRRef) AND (T1275._Fld26434RRef = T1274._IDRRef))) AND T1274._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1274._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1278
WHERE ((T1278._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1278._Fld22973RRef = T1274._IDRRef) AND (T1278._Fld22974_TYPE = \\010::bytea AND T1278._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1278._Fld22974_RRRef = T1272._Fld17507RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1279
WHERE ((T1279._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1279._Fld22980RRef = T1274._IDRRef) AND T1279._Fld22981_TYPE = \\010::bytea AND T1279._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1279._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1272._Fld1194 = CAST(0 AS NUMERIC))) T1271
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002#::bytea AND T1._Fld22706_RRRef = T1271.IDRRef
LEFT OUTER JOIN (SELECT
T1281._Marked AS Marked_,
T1281._IDRRef AS IDRRef,
T1281._Fld6022RRef AS Fld6022RRef,
T1281._Fld1194 AS Fld1194_
FROM _Reference222 T1281
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T1282
ON (T1281._Fld6022RRef = T1282._IDRRef) AND (T1282._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference159 T1283
ON ((T1282._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) AND ((T1282._Fld4110RRef = T1283._Fld4110RRef) OR (T1282._Fld4110RRef = T1283._IDRRef)) OR (T1281._Fld6022RRef = T1283._Fld4110RRef)) AND (T1283._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1284
INNER JOIN _Reference79 T1285
ON (T1284._Fld2999 = Справочник.ПравилаРегулярныхСчетовПокупателям::mvarchar) AND EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg26432 T1286
WHERE ((T1286._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1286._Fld26433_TYPE = \\010::bytea AND T1286._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1286._Fld26433_RRRef = T1284._IDRRef) AND (T1286._Fld26434RRef = T1285._IDRRef))) AND T1285._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1285._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT (((\\000\\000\\000\\237::bytea = \\000\\000\\000\\237::bytea)))) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1289
WHERE ((T1289._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1289._Fld22973RRef = T1285._IDRRef) AND (T1289._Fld22974_TYPE = \\010::bytea AND T1289._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1289._Fld22974_RRRef = T1281._Fld6022RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1290
WHERE ((T1290._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1290._Fld22980RRef = T1285._IDRRef) AND T1290._Fld22981_TYPE = \\010::bytea AND T1290._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1290._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((T1282._Fld4110RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T1291
WHERE ((T1291._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1291._Fld22973RRef = T1285._IDRRef) AND (T1291._Fld22974_TYPE = \\010::bytea AND T1291._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1291._Fld22974_RRRef = T1282._Fld4110RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T1292
WHERE ((T1292._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1292._Fld22980RRef = T1285._IDRRef) AND T1292._Fld22981_TYPE = CASE WHEN T1282._Fld4110RRef IS NOT NULL THEN \\010::bytea END AND T1292._Fld22981_RTRef = CASE WHEN T1282._Fld4110RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1292._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (T1282._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR ((T1283._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg22972 T1293
WHERE ((T1293._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1293._Fld22973RRef = T1285._IDRRef) AND (T1293._Fld22974_TYPE = \\010::bytea AND T1293._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1293._Fld22974_RRRef = T1283._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _InfoRg22979 T1294
WHERE ((T1294._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1294._Fld22980RRef = T1285._IDRRef) AND T1294._Fld22981_TYPE = CASE WHEN T1283._IDRRef IS NOT NULL THEN \\010::bytea END AND T1294._Fld22981_RTRef = CASE WHEN T1283._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1294._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1281._Fld1194 = CAST(0 AS NUMERIC))) T1280
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\336::bytea AND T1._Fld22706_RRRef = T1280.IDRRef
LEFT OUTER JOIN (SELECT
T1296._Marked AS Marked_,
T1296._IDRRef AS IDRRef,
T1296._Fld14202RRef AS Fld14202RRef,
T1296._Fld1194 AS Fld1194_
FROM _Document477 T1296
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1297
INNER JOIN _Reference79 T1298
ON (T1297._Fld2999 = Документ.ПакетОбменСБанками::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1299
WHERE ((T1299._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1299._Fld26433_TYPE = \\010::bytea AND T1299._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1299._Fld26433_RRRef = T1297._IDRRef) AND (T1299._Fld26434RRef = T1298._IDRRef))) AND T1298._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1298._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1302
WHERE ((T1302._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1302._Fld22973RRef = T1298._IDRRef) AND (T1302._Fld22974_TYPE = \\010::bytea AND T1302._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1302._Fld22974_RRRef = T1296._Fld14202RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1303
WHERE ((T1303._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1303._Fld22980RRef = T1298._IDRRef) AND T1303._Fld22981_TYPE = \\010::bytea AND T1303._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1303._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1296._Fld1194 = CAST(0 AS NUMERIC))) T1295
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\335::bytea AND T1._Fld22706_RRRef = T1295.IDRRef
LEFT OUTER JOIN _Reference45325 T1304
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\015::bytea AND T1._Fld22706_RRRef = T1304._IDRRef) AND (T1304._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference144 T1305
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\220::bytea AND T1._Fld22706_RRRef = T1305._IDRRef
LEFT OUTER JOIN (SELECT
T1307._Marked AS Marked_,
T1307._IDRRef AS IDRRef,
T1307._Fld12909RRef AS Fld12909RRef,
T1307._Fld1194 AS Fld1194_
FROM _Document451 T1307
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1308
INNER JOIN _Reference79 T1309
ON (T1308._Fld2999 = Документ.МодернизацияОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1310
WHERE ((T1310._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1310._Fld26433_TYPE = \\010::bytea AND T1310._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1310._Fld26433_RRRef = T1308._IDRRef) AND (T1310._Fld26434RRef = T1309._IDRRef))) AND T1309._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1309._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1313
WHERE ((T1313._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1313._Fld22973RRef = T1309._IDRRef) AND (T1313._Fld22974_TYPE = \\010::bytea AND T1313._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1313._Fld22974_RRRef = T1307._Fld12909RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1314
WHERE ((T1314._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1314._Fld22980RRef = T1309._IDRRef) AND T1314._Fld22981_TYPE = \\010::bytea AND T1314._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1314._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1307._Fld1194 = CAST(0 AS NUMERIC))) T1306
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\303::bytea AND T1._Fld22706_RRRef = T1306.IDRRef
LEFT OUTER JOIN _Reference268 T1315
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\014::bytea AND T1._Fld22706_RRRef = T1315._IDRRef) AND (T1315._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45436 T1316
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261|::bytea AND T1._Fld22706_RRRef = T1316._IDRRef) AND (T1316._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1318._Marked AS Marked_,
T1318._IDRRef AS IDRRef,
T1318._Fld34451RRef AS Fld34451RRef,
T1318._Fld1194 AS Fld1194_
FROM _Reference34047 T1318
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document426 T1319
ON (T1318._Fld34451RRef = T1319._IDRRef) AND (T1319._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1320
INNER JOIN _Reference79 T1321
ON (T1320._Fld2999 = Справочник.ЗаявлениеСотрудникаНаВыплатуПособияПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1322
WHERE ((T1322._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1322._Fld26433_TYPE = \\010::bytea AND T1322._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1322._Fld26433_RRRef = T1320._IDRRef) AND (T1322._Fld26434RRef = T1321._IDRRef))) AND T1321._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1321._Fld1194 = CAST(0 AS NUMERIC))) AND (((T1319._Fld11933RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1325
WHERE ((T1325._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1325._Fld22973RRef = T1321._IDRRef) AND (T1325._Fld22974_TYPE = \\010::bytea AND T1325._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1325._Fld22974_RRRef = T1319._Fld11933RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1326
WHERE ((T1326._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1326._Fld22980RRef = T1321._IDRRef) AND T1326._Fld22981_TYPE = CASE WHEN T1319._Fld11933RRef IS NOT NULL THEN \\010::bytea END AND T1326._Fld22981_RTRef = CASE WHEN T1319._Fld11933RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1326._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T1319._Fld11935RRef IS NOT NULL))))))) AND (T1318._Fld1194 = CAST(0 AS NUMERIC))) T1317
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\377::bytea AND T1._Fld22706_RRRef = T1317.IDRRef
LEFT OUTER JOIN (SELECT
T1328._Marked AS Marked_,
T1328._IDRRef AS IDRRef,
T1328._Fld15130RRef AS Fld15130RRef,
T1328._Fld1194 AS Fld1194_
FROM _Document502 T1328
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1329
INNER JOIN _Reference79 T1330
ON (T1329._Fld2999 = Документ.ПереоценкаТоваровВРознице::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1331
WHERE ((T1331._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1331._Fld26433_TYPE = \\010::bytea AND T1331._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1331._Fld26433_RRRef = T1329._IDRRef) AND (T1331._Fld26434RRef = T1330._IDRRef))) AND T1330._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1330._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1334
WHERE ((T1334._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1334._Fld22973RRef = T1330._IDRRef) AND (T1334._Fld22974_TYPE = \\010::bytea AND T1334._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1334._Fld22974_RRRef = T1328._Fld15130RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1335
WHERE ((T1335._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1335._Fld22980RRef = T1330._IDRRef) AND T1335._Fld22981_TYPE = \\010::bytea AND T1335._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1335._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1328._Fld1194 = CAST(0 AS NUMERIC))) T1327
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\366::bytea AND T1._Fld22706_RRRef = T1327.IDRRef
LEFT OUTER JOIN _Reference233 T1336
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\351::bytea AND T1._Fld22706_RRRef = T1336._IDRRef) AND (T1336._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference137 T1337
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\211::bytea AND T1._Fld22706_RRRef = T1337._IDRRef) AND (T1337._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1339._Marked AS Marked_,
T1339._IDRRef AS IDRRef,
T1339._Fld16446RRef AS Fld16446RRef,
T1339._Fld1194 AS Fld1194_
FROM _Document525 T1339
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1340
INNER JOIN _Reference79 T1341
ON (T1340._Fld2999 = Документ.ПрочиеКонтролируемыеСделки::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1342
WHERE ((T1342._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1342._Fld26433_TYPE = \\010::bytea AND T1342._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1342._Fld26433_RRRef = T1340._IDRRef) AND (T1342._Fld26434RRef = T1341._IDRRef))) AND T1341._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1341._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1345
WHERE ((T1345._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1345._Fld22973RRef = T1341._IDRRef) AND (T1345._Fld22974_TYPE = \\010::bytea AND T1345._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1345._Fld22974_RRRef = T1339._Fld16446RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1346
WHERE ((T1346._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1346._Fld22980RRef = T1341._IDRRef) AND T1346._Fld22981_TYPE = \\010::bytea AND T1346._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1346._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1339._Fld1194 = CAST(0 AS NUMERIC))) T1338
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\015::bytea AND T1._Fld22706_RRRef = T1338.IDRRef
LEFT OUTER JOIN _Reference87 T1347
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000W::bytea AND T1._Fld22706_RRRef = T1347._IDRRef) AND (T1347._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference227 T1348
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\343::bytea AND T1._Fld22706_RRRef = T1348._IDRRef) AND (T1348._Fld1248 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45415 T1349
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261g::bytea AND T1._Fld22706_RRRef = T1349._IDRRef) AND (T1349._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference121 T1350
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000y::bytea AND T1._Fld22706_RRRef = T1350._IDRRef) AND (T1350._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1352._Marked AS Marked_,
T1352._IDRRef AS IDRRef,
T1352._Fld34489RRef AS Fld34489RRef,
T1352._Fld1194 AS Fld1194_
FROM _Reference34048 T1352
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document439 T1353
ON (T1352._Fld34489RRef = T1353._IDRRef) AND (T1353._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1354
INNER JOIN _Reference79 T1355
ON (T1354._Fld2999 = Справочник.ИсполнительныйЛистПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1356
WHERE ((T1356._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1356._Fld26433_TYPE = \\010::bytea AND T1356._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1356._Fld26433_RRRef = T1354._IDRRef) AND (T1356._Fld26434RRef = T1355._IDRRef))) AND T1355._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1355._Fld1194 = CAST(0 AS NUMERIC))) AND (((T1353._Fld12282RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1359
WHERE ((T1359._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1359._Fld22973RRef = T1355._IDRRef) AND (T1359._Fld22974_TYPE = \\010::bytea AND T1359._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1359._Fld22974_RRRef = T1353._Fld12282RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1360
WHERE ((T1360._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1360._Fld22980RRef = T1355._IDRRef) AND T1360._Fld22981_TYPE = CASE WHEN T1353._Fld12282RRef IS NOT NULL THEN \\010::bytea END AND T1360._Fld22981_RTRef = CASE WHEN T1353._Fld12282RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1360._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T1353._Fld12283RRef IS NOT NULL))))))) AND (T1352._Fld1194 = CAST(0 AS NUMERIC))) T1351
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\000::bytea AND T1._Fld22706_RRRef = T1351.IDRRef
LEFT OUTER JOIN (SELECT
T1362._Marked AS Marked_,
T1362._IDRRef AS IDRRef,
T1362._Fld32759RRef AS Fld32759RRef,
T1362._Fld1194 AS Fld1194_
FROM _Document32751 T1362
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1363
INNER JOIN _Reference79 T1364
ON (T1363._Fld2999 = Документ.ОперацияСБилетом::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1365
WHERE ((T1365._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1365._Fld26433_TYPE = \\010::bytea AND T1365._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1365._Fld26433_RRRef = T1363._IDRRef) AND (T1365._Fld26434RRef = T1364._IDRRef))) AND T1364._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1364._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1368
WHERE ((T1368._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1368._Fld22973RRef = T1364._IDRRef) AND (T1368._Fld22974_TYPE = \\010::bytea AND T1368._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1368._Fld22974_RRRef = T1362._Fld32759RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1369
WHERE ((T1369._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1369._Fld22980RRef = T1364._IDRRef) AND T1369._Fld22981_TYPE = \\010::bytea AND T1369._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1369._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1362._Fld1194 = CAST(0 AS NUMERIC))) T1361
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\357::bytea AND T1._Fld22706_RRRef = T1361.IDRRef
LEFT OUTER JOIN (SELECT
T1371._Marked AS Marked_,
T1371._IDRRef AS IDRRef,
T1371._Fld46995RRef AS Fld46995RRef,
T1371._Fld1194 AS Fld1194_
FROM _Document45540 T1371
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T1372
ON ((T1372._Fld4110RRef = T1371._Fld46995RRef) AND (T1372._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR (T1372._IDRRef = T1371._Fld46995RRef)) AND (T1372._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1373
INNER JOIN _Reference79 T1374
ON (T1373._Fld2999 = Документ.ВерсияСоглашенияВалютноПроцентныйСвоп::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1375
WHERE ((T1375._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1375._Fld26433_TYPE = \\010::bytea AND T1375._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1375._Fld26433_RRRef = T1373._IDRRef) AND (T1375._Fld26434RRef = T1374._IDRRef))) AND T1374._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1374._Fld1194 = CAST(0 AS NUMERIC))) AND (((T1372._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1378
WHERE ((T1378._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1378._Fld22973RRef = T1374._IDRRef) AND (T1378._Fld22974_TYPE = \\010::bytea AND T1378._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1378._Fld22974_RRRef = T1372._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1379
WHERE ((T1379._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1379._Fld22980RRef = T1374._IDRRef) AND T1379._Fld22981_TYPE = CASE WHEN T1372._IDRRef IS NOT NULL THEN \\010::bytea END AND T1379._Fld22981_RTRef = CASE WHEN T1372._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1379._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1371._Fld1194 = CAST(0 AS NUMERIC))) T1370
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\344::bytea AND T1._Fld22706_RRRef = T1370.IDRRef
LEFT OUTER JOIN (SELECT
T1381._Marked AS Marked_,
T1381._IDRRef AS IDRRef,
T1381._Fld1194 AS Fld1194_,
T1381._Fld10552RRef AS Fld10552RRef
FROM _Document394 T1381
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1382
INNER JOIN _Reference79 T1383
ON (T1382._Fld2999 = Документ.ВозвратТоваровОтПокупателя::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1384
WHERE ((T1384._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1384._Fld26433_TYPE = \\010::bytea AND T1384._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1384._Fld26433_RRRef = T1382._IDRRef) AND (T1384._Fld26434RRef = T1383._IDRRef))) AND T1383._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1383._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1387
WHERE ((T1387._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1387._Fld22973RRef = T1383._IDRRef) AND (T1387._Fld22974_TYPE = \\010::bytea AND T1387._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1387._Fld22974_RRRef = T1381._Fld10552RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1388
WHERE ((T1388._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1388._Fld22980RRef = T1383._IDRRef) AND T1388._Fld22981_TYPE = \\010::bytea AND T1388._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1388._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1381._Fld1194 = CAST(0 AS NUMERIC))) T1380
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\212::bytea AND T1._Fld22706_RRRef = T1380.IDRRef
LEFT OUTER JOIN (SELECT
T1390._Marked AS Marked_,
T1390._IDRRef AS IDRRef,
T1390._Fld14399RRef AS Fld14399RRef,
T1390._Fld1194 AS Fld1194_
FROM _Document485 T1390
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1391
INNER JOIN _Reference79 T1392
ON (T1391._Fld2999 = Документ.ПачкаДокументовСЗВ_6_1::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1393
WHERE ((T1393._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1393._Fld26433_TYPE = \\010::bytea AND T1393._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1393._Fld26433_RRRef = T1391._IDRRef) AND (T1393._Fld26434RRef = T1392._IDRRef))) AND T1392._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1392._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document485_VT14457 T1396
WHERE ((T1396._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1390._IDRRef = T1396._Document485_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1397
WHERE ((T1397._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1397._Fld22973RRef = T1392._IDRRef) AND (T1397._Fld22974_TYPE = \\010::bytea AND T1397._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1397._Fld22974_RRRef = T1390._Fld14399RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1398
WHERE ((T1398._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1398._Fld22980RRef = T1392._IDRRef) AND T1398._Fld22981_TYPE = \\010::bytea AND T1398._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1398._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1390._Fld1194 = CAST(0 AS NUMERIC))) T1389
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\345::bytea AND T1._Fld22706_RRRef = T1389.IDRRef
LEFT OUTER JOIN _Reference210 T1399
ON ((T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\322::bytea AND T1._Fld22706_RRRef = T1399._IDRRef) AND (T1399._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1399._Fld5711_TYPE = \\010::bytea AND T1399._Fld5711_RTRef = \\000\\000\\000\\321::bytea AND T1399._Fld5711_RRRef = \\207\\305\\3207E*\\320\\277\\021\\354*\\224\\032\\262\\311v::bytea))
LEFT OUTER JOIN _Document45603 T1400
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262#::bytea AND T1._Fld22706_RRRef = T1400._IDRRef) AND (T1400._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1402._Marked AS Marked_,
T1402._IDRRef AS IDRRef,
T1402._Fld5625RRef AS Fld5625RRef,
T1402._Fld1194 AS Fld1194_
FROM _Reference207 T1402
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document511 T1403
ON (T1402._Fld5625RRef = T1403._IDRRef) AND (T1403._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1404
INNER JOIN _Reference79 T1405
ON (T1404._Fld2999 = Справочник.ПодтверждениеОткрытияЛицевыхСчетовСотрудниковПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1406
WHERE ((T1406._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1406._Fld26433_TYPE = \\010::bytea AND T1406._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1406._Fld26433_RRRef = T1404._IDRRef) AND (T1406._Fld26434RRef = T1405._IDRRef))) AND T1405._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1405._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document511_VT15409 T1409
WHERE ((T1409._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1402._Fld5625RRef = T1409._Document511_IDRRef) AND (NOT (((1=1))))))))) AND ((T1403._Fld15401RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1410
WHERE ((T1410._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1410._Fld22973RRef = T1405._IDRRef) AND (T1410._Fld22974_TYPE = \\010::bytea AND T1410._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1410._Fld22974_RRRef = T1403._Fld15401RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1411
WHERE ((T1411._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1411._Fld22980RRef = T1405._IDRRef) AND T1411._Fld22981_TYPE = CASE WHEN T1403._Fld15401RRef IS NOT NULL THEN \\010::bytea END AND T1411._Fld22981_RTRef = CASE WHEN T1403._Fld15401RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1411._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1402._Fld1194 = CAST(0 AS NUMERIC))) T1401
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\317::bytea AND T1._Fld22706_RRRef = T1401.IDRRef
LEFT OUTER JOIN (SELECT
T1413._Marked AS Marked_,
T1413._IDRRef AS IDRRef,
T1413._Fld9200RRef AS Fld9200RRef,
T1413._Fld9198RRef AS Fld9198RRef,
T1413._Fld1194 AS Fld1194_
FROM _Document374 T1413
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1414
INNER JOIN _Reference79 T1415
ON (T1414._Fld2999 = Документ.АвизоОСИсходящее::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T1416
WHERE ((T1416._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1416._Fld26433_TYPE = \\010::bytea AND T1416._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1416._Fld26433_RRRef = T1414._IDRRef) AND (T1416._Fld26434RRef = T1415._IDRRef))) AND T1415._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1415._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1419
WHERE ((T1419._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1419._Fld22973RRef = T1415._IDRRef) AND (T1419._Fld22974_TYPE = \\010::bytea AND T1419._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1419._Fld22974_RRRef = T1413._Fld9198RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1420
WHERE ((T1420._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1420._Fld22980RRef = T1415._IDRRef) AND T1420._Fld22981_TYPE = \\010::bytea AND T1420._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1420._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T1421
WHERE ((T1421._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1421._Fld22973RRef = T1415._IDRRef) AND (T1421._Fld22974_TYPE = \\010::bytea AND T1421._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1421._Fld22974_RRRef = T1413._Fld9200RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T1422
WHERE ((T1422._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1422._Fld22980RRef = T1415._IDRRef) AND T1422._Fld22981_TYPE = \\010::bytea AND T1422._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1422._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1413._Fld1194 = CAST(0 AS NUMERIC))) T1412
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001v::bytea AND T1._Fld22706_RRRef = T1412.IDRRef
LEFT OUTER JOIN _Reference46 T1423
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000.::bytea AND T1._Fld22706_RRRef = T1423._IDRRef) AND (T1423._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1425._Marked AS Marked_,
T1425._IDRRef AS IDRRef,
T1425._Fld9092RRef AS Fld9092RRef,
T1425._Fld9089RRef AS Fld9089RRef,
T1425._Fld1194 AS Fld1194_
FROM _Document372 T1425
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1426
INNER JOIN _Reference79 T1427
ON (T1426._Fld2999 = Документ.АвизоМПЗИсходящее::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T1428
WHERE ((T1428._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1428._Fld26433_TYPE = \\010::bytea AND T1428._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1428._Fld26433_RRRef = T1426._IDRRef) AND (T1428._Fld26434RRef = T1427._IDRRef))) AND T1427._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1427._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1431
WHERE ((T1431._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1431._Fld22973RRef = T1427._IDRRef) AND (T1431._Fld22974_TYPE = \\010::bytea AND T1431._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1431._Fld22974_RRRef = T1425._Fld9089RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1432
WHERE ((T1432._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1432._Fld22980RRef = T1427._IDRRef) AND T1432._Fld22981_TYPE = \\010::bytea AND T1432._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1432._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T1433
WHERE ((T1433._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1433._Fld22973RRef = T1427._IDRRef) AND (T1433._Fld22974_TYPE = \\010::bytea AND T1433._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1433._Fld22974_RRRef = T1425._Fld9092RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T1434
WHERE ((T1434._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1434._Fld22980RRef = T1427._IDRRef) AND T1434._Fld22981_TYPE = \\010::bytea AND T1434._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1434._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1425._Fld1194 = CAST(0 AS NUMERIC))) T1424
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001t::bytea AND T1._Fld22706_RRRef = T1424.IDRRef
LEFT OUTER JOIN (SELECT
T1436._Marked AS Marked_,
T1436._IDRRef AS IDRRef,
T1436._Fld18198RRef AS Fld18198RRef,
T1436._Fld18192RRef AS Fld18192RRef,
T1436._Fld1194 AS Fld1194_
FROM _Document560 T1436
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1437
INNER JOIN _Reference79 T1438
ON (T1437._Fld2999 = Документ.СчетНаОплатуПокупателю::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T1439
WHERE ((T1439._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1439._Fld26433_TYPE = \\010::bytea AND T1439._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1439._Fld26433_RRRef = T1437._IDRRef) AND (T1439._Fld26434RRef = T1438._IDRRef))) AND T1438._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1438._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1442
WHERE ((T1442._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1442._Fld22973RRef = T1438._IDRRef) AND (T1442._Fld22974_TYPE = \\010::bytea AND T1442._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1442._Fld22974_RRRef = T1436._Fld18192RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1443
WHERE ((T1443._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1443._Fld22980RRef = T1438._IDRRef) AND T1443._Fld22981_TYPE = \\010::bytea AND T1443._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1443._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T1444
WHERE ((T1444._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1444._Fld22973RRef = T1438._IDRRef) AND (T1444._Fld22974_TYPE = \\010::bytea AND T1444._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1444._Fld22974_RRRef = T1436._Fld18198RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T1445
WHERE ((T1445._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1445._Fld22980RRef = T1438._IDRRef) AND T1445._Fld22981_TYPE = \\010::bytea AND T1445._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1445._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1436._Fld1194 = CAST(0 AS NUMERIC))) T1435
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0020::bytea AND T1._Fld22706_RRRef = T1435.IDRRef
LEFT OUTER JOIN _Reference107 T1446
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000k::bytea AND T1._Fld22706_RRRef = T1446._IDRRef) AND (T1446._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1448._Marked AS Marked_,
T1448._IDRRef AS IDRRef,
T1448._Fld15032RRef AS Fld15032RRef,
T1448._Fld1194 AS Fld1194_
FROM _Document499 T1448
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1449
INNER JOIN _Reference79 T1450
ON (T1449._Fld2999 = Документ.ПередачаТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1451
WHERE ((T1451._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1451._Fld26433_TYPE = \\010::bytea AND T1451._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1451._Fld26433_RRRef = T1449._IDRRef) AND (T1451._Fld26434RRef = T1450._IDRRef))) AND T1450._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1450._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1454
WHERE ((T1454._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1454._Fld22973RRef = T1450._IDRRef) AND (T1454._Fld22974_TYPE = \\010::bytea AND T1454._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1454._Fld22974_RRRef = T1448._Fld15032RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1455
WHERE ((T1455._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1455._Fld22980RRef = T1450._IDRRef) AND T1455._Fld22981_TYPE = \\010::bytea AND T1455._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1455._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1448._Fld1194 = CAST(0 AS NUMERIC))) T1447
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\363::bytea AND T1._Fld22706_RRRef = T1447.IDRRef
LEFT OUTER JOIN (SELECT
T1457._Marked AS Marked_,
T1457._IDRRef AS IDRRef,
T1457._Fld1194 AS Fld1194_,
T1457._Fld10878RRef AS Fld10878RRef
FROM _Document401 T1457
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1458
INNER JOIN _Reference79 T1459
ON (T1458._Fld2999 = Документ.ВыработкаМатериалов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1460
WHERE ((T1460._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1460._Fld26433_TYPE = \\010::bytea AND T1460._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1460._Fld26433_RRRef = T1458._IDRRef) AND (T1460._Fld26434RRef = T1459._IDRRef))) AND T1459._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1459._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1463
WHERE ((T1463._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1463._Fld22973RRef = T1459._IDRRef) AND (T1463._Fld22974_TYPE = \\010::bytea AND T1463._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1463._Fld22974_RRRef = T1457._Fld10878RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1464
WHERE ((T1464._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1464._Fld22980RRef = T1459._IDRRef) AND T1464._Fld22981_TYPE = \\010::bytea AND T1464._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1464._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1457._Fld1194 = CAST(0 AS NUMERIC))) T1456
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\221::bytea AND T1._Fld22706_RRRef = T1456.IDRRef
LEFT OUTER JOIN (SELECT
T1466._Marked AS Marked_,
T1466._IDRRef AS IDRRef,
T1466._Fld12397RRef AS Fld12397RRef,
T1466._Fld1194 AS Fld1194_
FROM _Document443 T1466
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1467
INNER JOIN _Reference79 T1468
ON (T1467._Fld2999 = Документ.УдалитьКассовыйЧекКоррекции::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1469
WHERE ((T1469._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1469._Fld26433_TYPE = \\010::bytea AND T1469._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1469._Fld26433_RRRef = T1467._IDRRef) AND (T1469._Fld26434RRef = T1468._IDRRef))) AND T1468._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1468._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1472
WHERE ((T1472._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1472._Fld22973RRef = T1468._IDRRef) AND (T1472._Fld22974_TYPE = \\010::bytea AND T1472._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1472._Fld22974_RRRef = T1466._Fld12397RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1473
WHERE ((T1473._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1473._Fld22980RRef = T1468._IDRRef) AND T1473._Fld22981_TYPE = \\010::bytea AND T1473._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1473._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1466._Fld1194 = CAST(0 AS NUMERIC))) T1465
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\273::bytea AND T1._Fld22706_RRRef = T1465.IDRRef
LEFT OUTER JOIN (SELECT
T1475._Marked AS Marked_,
T1475._IDRRef AS IDRRef,
T1475._Fld47285RRef AS Fld47285RRef,
T1475._Fld1194 AS Fld1194_
FROM _Document45542 T1475
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T1476
ON ((T1476._Fld4110RRef = T1475._Fld47285RRef) AND (T1476._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR (T1476._IDRRef = T1475._Fld47285RRef)) AND (T1476._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1477
INNER JOIN _Reference79 T1478
ON (T1477._Fld2999 = Документ.ВерсияСоглашенияВалютныйФорвард::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1479
WHERE ((T1479._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1479._Fld26433_TYPE = \\010::bytea AND T1479._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1479._Fld26433_RRRef = T1477._IDRRef) AND (T1479._Fld26434RRef = T1478._IDRRef))) AND T1478._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1478._Fld1194 = CAST(0 AS NUMERIC))) AND (((T1476._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1482
WHERE ((T1482._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1482._Fld22973RRef = T1478._IDRRef) AND (T1482._Fld22974_TYPE = \\010::bytea AND T1482._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1482._Fld22974_RRRef = T1476._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1483
WHERE ((T1483._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1483._Fld22980RRef = T1478._IDRRef) AND T1483._Fld22981_TYPE = CASE WHEN T1476._IDRRef IS NOT NULL THEN \\010::bytea END AND T1483._Fld22981_RTRef = CASE WHEN T1476._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1483._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1475._Fld1194 = CAST(0 AS NUMERIC))) T1474
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\346::bytea AND T1._Fld22706_RRRef = T1474.IDRRef
LEFT OUTER JOIN _Reference218 T1484
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\332::bytea AND T1._Fld22706_RRRef = T1484._IDRRef) AND (T1484._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1486._Marked AS Marked_,
T1486._IDRRef AS IDRRef,
T1486._Fld18762RRef AS Fld18762RRef,
T1486._Fld1194 AS Fld1194_
FROM _Document572 T1486
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1487
INNER JOIN _Reference79 T1488
ON (T1487._Fld2999 = Документ.УведомлениеОКонтролируемыхСделках::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1489
WHERE ((T1489._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1489._Fld26433_TYPE = \\010::bytea AND T1489._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1489._Fld26433_RRRef = T1487._IDRRef) AND (T1489._Fld26434RRef = T1488._IDRRef))) AND T1488._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1488._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1492
WHERE ((T1492._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1492._Fld22973RRef = T1488._IDRRef) AND (T1492._Fld22974_TYPE = \\010::bytea AND T1492._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1492._Fld22974_RRRef = T1486._Fld18762RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1493
WHERE ((T1493._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1493._Fld22980RRef = T1488._IDRRef) AND T1493._Fld22981_TYPE = \\010::bytea AND T1493._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1493._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1486._Fld1194 = CAST(0 AS NUMERIC))) T1485
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002<::bytea AND T1._Fld22706_RRRef = T1485.IDRRef
LEFT OUTER JOIN _Reference45463 T1494
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\227::bytea AND T1._Fld22706_RRRef = T1494._IDRRef) AND (T1494._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference29482 T1495
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000s*::bytea AND T1._Fld22706_RRRef = T1495._IDRRef) AND (T1495._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1497._OwnerIDRRef AS OwnerIDRRef,
T1497._Marked AS Marked_,
T1497._IDRRef AS IDRRef,
T1497._Fld1194 AS Fld1194_
FROM _Reference104 T1497
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Chrc1185 T1498
ON (T1497._OwnerIDRRef = T1498._IDRRef) AND (T1498._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1499
INNER JOIN _Reference79 T1500
ON (T1499._Fld2999 = Справочник.ЗначенияСвойствОбъектов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg26432 T1501
WHERE ((T1501._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1501._Fld26433_TYPE = \\010::bytea AND T1501._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1501._Fld26433_RRRef = T1499._IDRRef) AND (T1501._Fld26434RRef = T1500._IDRRef))) AND T1500._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1500._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) OR (T1498._Fld29281 = FALSE)))))) AND (T1497._Fld1194 = CAST(0 AS NUMERIC))) T1496
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000h::bytea AND T1._Fld22706_RRRef = T1496.IDRRef
LEFT OUTER JOIN _Reference38483 T1504
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\226S::bytea AND T1._Fld22706_RRRef = T1504._IDRRef) AND (T1504._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1506._Marked AS Marked_,
T1506._IDRRef AS IDRRef,
T1506._Fld13287RRef AS Fld13287RRef,
T1506._Fld13286RRef AS Fld13286RRef,
T1506._Fld1194 AS Fld1194_
FROM _Document459 T1506
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1507
INNER JOIN _Reference79 T1508
ON (T1507._Fld2999 = Документ.ОперацияУчетаПоСтраховымВзносам::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1509
WHERE ((T1509._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1509._Fld26433_TYPE = \\010::bytea AND T1509._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1509._Fld26433_RRRef = T1507._IDRRef) AND (T1509._Fld26434RRef = T1508._IDRRef))) AND T1508._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1508._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1512
WHERE ((T1512._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1512._Fld22973RRef = T1508._IDRRef) AND (T1512._Fld22974_TYPE = \\010::bytea AND T1512._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1512._Fld22974_RRRef = T1506._Fld13286RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1513
WHERE ((T1513._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1513._Fld22980RRef = T1508._IDRRef) AND T1513._Fld22981_TYPE = \\010::bytea AND T1513._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1513._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1506._Fld1194 = CAST(0 AS NUMERIC))) T1505
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\313::bytea AND T1._Fld22706_RRRef = T1505.IDRRef
LEFT OUTER JOIN (SELECT
T1515._Marked AS Marked_,
T1515._IDRRef AS IDRRef,
T1515._Fld13530RRef AS Fld13530RRef,
T1515._Fld13528RRef AS Fld13528RRef,
T1515._Fld1194 AS Fld1194_
FROM _Document467 T1515
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1516
INNER JOIN _Reference79 T1517
ON (T1516._Fld2999 = Документ.Отпуск::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1518
WHERE ((T1518._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1518._Fld26433_TYPE = \\010::bytea AND T1518._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1518._Fld26433_RRRef = T1516._IDRRef) AND (T1518._Fld26434RRef = T1517._IDRRef))) AND T1517._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1517._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1521
WHERE ((T1521._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1521._Fld22973RRef = T1517._IDRRef) AND (T1521._Fld22974_TYPE = \\010::bytea AND T1521._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1521._Fld22974_RRRef = T1515._Fld13528RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1522
WHERE ((T1522._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1522._Fld22980RRef = T1517._IDRRef) AND T1522._Fld22981_TYPE = \\010::bytea AND T1522._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1522._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1515._Fld1194 = CAST(0 AS NUMERIC))) T1514
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\323::bytea AND T1._Fld22706_RRRef = T1514.IDRRef
LEFT OUTER JOIN _Reference36691 T1523
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217S::bytea AND T1._Fld22706_RRRef = T1523._IDRRef) AND (T1523._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45280 T1524
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\340::bytea AND T1._Fld22706_RRRef = T1524._IDRRef) AND (T1524._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1526._Marked AS Marked_,
T1526._IDRRef AS IDRRef,
T1526._Fld12168RRef AS Fld12168RRef,
T1526._Fld1194 AS Fld1194_
FROM _Document433 T1526
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1527
INNER JOIN _Reference79 T1528
ON (T1527._Fld2999 = Документ.ИзменениеСпособовОтраженияРасходовПоАмортизацииНМА::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1529
WHERE ((T1529._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1529._Fld26433_TYPE = \\010::bytea AND T1529._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1529._Fld26433_RRRef = T1527._IDRRef) AND (T1529._Fld26434RRef = T1528._IDRRef))) AND T1528._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1528._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1532
WHERE ((T1532._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1532._Fld22973RRef = T1528._IDRRef) AND (T1532._Fld22974_TYPE = \\010::bytea AND T1532._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1532._Fld22974_RRRef = T1526._Fld12168RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1533
WHERE ((T1533._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1533._Fld22980RRef = T1528._IDRRef) AND T1533._Fld22981_TYPE = \\010::bytea AND T1533._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1533._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1526._Fld1194 = CAST(0 AS NUMERIC))) T1525
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\261::bytea AND T1._Fld22706_RRRef = T1525.IDRRef
LEFT OUTER JOIN _Reference44978 T1534
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\257\\262::bytea AND T1._Fld22706_RRRef = T1534._IDRRef) AND (T1534._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference288 T1535
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001 ::bytea AND T1._Fld22706_RRRef = T1535._IDRRef) AND (T1535._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference242 T1536
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\362::bytea AND T1._Fld22706_RRRef = T1536._IDRRef) AND (T1536._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1538._Marked AS Marked_,
T1538._IDRRef AS IDRRef,
T1538._Fld13423RRef AS Fld13423RRef,
T1538._Fld1194 AS Fld1194_
FROM _Document463 T1538
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1539
INNER JOIN _Reference79 T1540
ON (T1539._Fld2999 = Документ.ОплатаПлатежнойКартой::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1541
WHERE ((T1541._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1541._Fld26433_TYPE = \\010::bytea AND T1541._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1541._Fld26433_RRRef = T1539._IDRRef) AND (T1541._Fld26434RRef = T1540._IDRRef))) AND T1540._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1540._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1544
WHERE ((T1544._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1544._Fld22973RRef = T1540._IDRRef) AND (T1544._Fld22974_TYPE = \\010::bytea AND T1544._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1544._Fld22974_RRRef = T1538._Fld13423RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1545
WHERE ((T1545._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1545._Fld22980RRef = T1540._IDRRef) AND T1545._Fld22981_TYPE = \\010::bytea AND T1545._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1545._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1538._Fld1194 = CAST(0 AS NUMERIC))) T1537
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\317::bytea AND T1._Fld22706_RRRef = T1537.IDRRef
LEFT OUTER JOIN _Reference30901 T1546
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\265::bytea AND T1._Fld22706_RRRef = T1546._IDRRef) AND (T1546._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document616 T1547
ON ((T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002h::bytea AND T1._Fld22706_RRRef = T1547._IDRRef) AND (T1547._Fld1194 = CAST(0 AS NUMERIC))) AND (1=0)
LEFT OUTER JOIN (SELECT
T1549._Marked AS Marked_,
T1549._IDRRef AS IDRRef,
T1549._Fld17053RRef AS Fld17053RRef,
T1549._Fld1194 AS Fld1194_
FROM _Document540 T1549
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1550
INNER JOIN _Reference79 T1551
ON (T1550._Fld2999 = Документ.РеестрСведенийНеобходимыхДляНазначенияИВыплатыПособий::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1552
WHERE ((T1552._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1552._Fld26433_TYPE = \\010::bytea AND T1552._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1552._Fld26433_RRRef = T1550._IDRRef) AND (T1552._Fld26434RRef = T1551._IDRRef))) AND T1551._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1551._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document540_VT17171 T1555
WHERE ((T1555._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1549._IDRRef = T1555._Document540_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1556
WHERE ((T1556._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1556._Fld22973RRef = T1551._IDRRef) AND (T1556._Fld22974_TYPE = \\010::bytea AND T1556._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1556._Fld22974_RRRef = T1549._Fld17053RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1557
WHERE ((T1557._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1557._Fld22980RRef = T1551._IDRRef) AND T1557._Fld22981_TYPE = \\010::bytea AND T1557._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1557._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1549._Fld1194 = CAST(0 AS NUMERIC))) T1548
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\034::bytea AND T1._Fld22706_RRRef = T1548.IDRRef
LEFT OUTER JOIN _Reference95 T1558
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000_::bytea AND T1._Fld22706_RRRef = T1558._IDRRef
LEFT OUTER JOIN (SELECT
T1560._OwnerID_TYPE AS OwnerID_TYPE,
T1560._OwnerID_RTRef AS OwnerID_RTRef,
T1560._OwnerID_RRRef AS OwnerID_RRRef,
T1560._Marked AS Marked_,
T1560._IDRRef AS IDRRef,
T1560._Fld1194 AS Fld1194_
FROM _Reference44 T1560
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T1561
ON (T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea AND T1560._OwnerID_RRRef = T1561._IDRRef) AND (T1561._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference159 T1562
ON ((CASE WHEN T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea THEN T1561._Fld4110RRef ELSE CAST(NULL AS BYTEA) END <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) AND ((CASE WHEN T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea THEN T1561._Fld4110RRef ELSE CAST(NULL AS BYTEA) END = T1562._Fld4110RRef) OR (CASE WHEN T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea THEN T1561._Fld4110RRef ELSE CAST(NULL AS BYTEA) END = T1562._IDRRef)) OR (T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea AND T1560._OwnerID_RRRef = T1562._Fld4110RRef)) AND (T1562._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1563
INNER JOIN _Reference79 T1564
ON (T1563._Fld2999 = Справочник.БанковскиеСчета::mvarchar) AND EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg26432 T1565
WHERE ((T1565._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1565._Fld26433_TYPE = \\010::bytea AND T1565._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1565._Fld26433_RRRef = T1563._IDRRef) AND (T1565._Fld26434RRef = T1564._IDRRef))) AND T1564._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1564._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT (((T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea)))) OR (T1560._OwnerID_TYPE = \\010::bytea) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1568
WHERE ((T1568._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1568._Fld22973RRef = T1564._IDRRef) AND (T1568._Fld22974_TYPE = T1560._OwnerID_TYPE AND T1568._Fld22974_RTRef = T1560._OwnerID_RTRef AND T1568._Fld22974_RRRef = T1560._OwnerID_RRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1569
WHERE ((T1569._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1569._Fld22980RRef = T1564._IDRRef) AND T1569._Fld22981_TYPE = T1560._OwnerID_TYPE AND T1569._Fld22981_RTRef = T1560._OwnerID_RTRef AND (T1569._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((CASE WHEN T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea THEN T1561._Fld4110RRef ELSE CAST(NULL AS BYTEA) END IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T1570
WHERE ((T1570._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1570._Fld22973RRef = T1564._IDRRef) AND (T1570._Fld22974_TYPE = \\010::bytea AND T1570._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1570._Fld22974_RRRef = CASE WHEN T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea THEN T1561._Fld4110RRef ELSE CAST(NULL AS BYTEA) END))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T1571
WHERE ((T1571._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1571._Fld22980RRef = T1564._IDRRef) AND T1571._Fld22981_TYPE = CASE WHEN CASE WHEN T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea THEN T1561._Fld4110RRef ELSE CAST(NULL AS BYTEA) END IS NOT NULL THEN \\010::bytea END AND T1571._Fld22981_RTRef = CASE WHEN CASE WHEN T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea THEN T1561._Fld4110RRef ELSE CAST(NULL AS BYTEA) END IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1571._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (CASE WHEN T1560._OwnerID_TYPE = \\010::bytea AND T1560._OwnerID_RTRef = \\000\\000\\000\\237::bytea THEN T1561._Fld4110RRef ELSE CAST(NULL AS BYTEA) END <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR ((T1562._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg22972 T1572
WHERE ((T1572._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1572._Fld22973RRef = T1564._IDRRef) AND (T1572._Fld22974_TYPE = \\010::bytea AND T1572._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1572._Fld22974_RRRef = T1562._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _InfoRg22979 T1573
WHERE ((T1573._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1573._Fld22980RRef = T1564._IDRRef) AND T1573._Fld22981_TYPE = CASE WHEN T1562._IDRRef IS NOT NULL THEN \\010::bytea END AND T1573._Fld22981_RTRef = CASE WHEN T1562._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1573._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1560._Fld1194 = CAST(0 AS NUMERIC))) T1559
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000,::bytea AND T1._Fld22706_RRRef = T1559.IDRRef
LEFT OUTER JOIN _Reference45504 T1574
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\300::bytea AND T1._Fld22706_RRRef = T1574._IDRRef) AND (T1574._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1576._Marked AS Marked_,
T1576._IDRRef AS IDRRef,
T1576._Fld18567RRef AS Fld18567RRef,
T1576._Fld1194 AS Fld1194_
FROM _Document566 T1576
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1577
INNER JOIN _Reference79 T1578
ON (T1577._Fld2999 = Документ.ТребованиеНакладная::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1579
WHERE ((T1579._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1579._Fld26433_TYPE = \\010::bytea AND T1579._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1579._Fld26433_RRRef = T1577._IDRRef) AND (T1579._Fld26434RRef = T1578._IDRRef))) AND T1578._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1578._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1582
WHERE ((T1582._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1582._Fld22973RRef = T1578._IDRRef) AND (T1582._Fld22974_TYPE = \\010::bytea AND T1582._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1582._Fld22974_RRRef = T1576._Fld18567RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1583
WHERE ((T1583._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1583._Fld22980RRef = T1578._IDRRef) AND T1583._Fld22981_TYPE = \\010::bytea AND T1583._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1583._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1576._Fld1194 = CAST(0 AS NUMERIC))) T1575
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0026::bytea AND T1._Fld22706_RRRef = T1575.IDRRef
LEFT OUTER JOIN (SELECT
T1585._Marked AS Marked_,
T1585._IDRRef AS IDRRef,
T1585._Fld35173RRef AS Fld35173RRef,
T1585._Fld1194 AS Fld1194_
FROM _Reference34066 T1585
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document556 T1586
ON (T1585._Fld35173RRef = T1586._IDRRef) AND (T1586._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1587
INNER JOIN _Reference79 T1588
ON (T1587._Fld2999 = Справочник.СправкаНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1589
WHERE ((T1589._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1589._Fld26433_TYPE = \\010::bytea AND T1589._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1589._Fld26433_RRRef = T1587._IDRRef) AND (T1589._Fld26434RRef = T1588._IDRRef))) AND T1588._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1588._Fld1194 = CAST(0 AS NUMERIC))) AND (((T1586._Fld17792RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1592
WHERE ((T1592._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1592._Fld22973RRef = T1588._IDRRef) AND (T1592._Fld22974_TYPE = \\010::bytea AND T1592._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1592._Fld22974_RRRef = T1586._Fld17792RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1593
WHERE ((T1593._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1593._Fld22980RRef = T1588._IDRRef) AND T1593._Fld22981_TYPE = CASE WHEN T1586._Fld17792RRef IS NOT NULL THEN \\010::bytea END AND T1593._Fld22981_RTRef = CASE WHEN T1586._Fld17792RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1593._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T1586._Fld17798RRef IS NOT NULL))))))) AND (T1585._Fld1194 = CAST(0 AS NUMERIC))) T1584
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\022::bytea AND T1._Fld22706_RRRef = T1584.IDRRef
LEFT OUTER JOIN _Reference30894 T1594
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\256::bytea AND T1._Fld22706_RRRef = T1594._IDRRef) AND (T1594._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document45557 T1595
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\365::bytea AND T1._Fld22706_RRRef = T1595._IDRRef) AND (T1595._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference283 T1596
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\033::bytea AND T1._Fld22706_RRRef = T1596._IDRRef) AND (T1596._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference239 T1597
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\357::bytea AND T1._Fld22706_RRRef = T1597._IDRRef) AND (T1597._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1599._Marked AS Marked_,
T1599._IDRRef AS IDRRef,
T1599._Fld12468RRef AS Fld12468RRef,
T1599._Fld1194 AS Fld1194_
FROM _Document445 T1599
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1600
INNER JOIN _Reference79 T1601
ON (T1600._Fld2999 = Документ.КнигаПродажДляПередачиВЭлектронномВиде::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1602
WHERE ((T1602._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1602._Fld26433_TYPE = \\010::bytea AND T1602._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1602._Fld26433_RRRef = T1600._IDRRef) AND (T1602._Fld26434RRef = T1601._IDRRef))) AND T1601._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1601._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1605
WHERE ((T1605._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1605._Fld22973RRef = T1601._IDRRef) AND (T1605._Fld22974_TYPE = \\010::bytea AND T1605._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1605._Fld22974_RRRef = T1599._Fld12468RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1606
WHERE ((T1606._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1606._Fld22980RRef = T1601._IDRRef) AND T1606._Fld22981_TYPE = \\010::bytea AND T1606._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1606._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1599._Fld1194 = CAST(0 AS NUMERIC))) T1598
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\275::bytea AND T1._Fld22706_RRRef = T1598.IDRRef
LEFT OUTER JOIN (SELECT
T1608._Marked AS Marked_,
T1608._IDRRef AS IDRRef,
T1608._Fld12228RRef AS Fld12228RRef,
T1608._Fld1194 AS Fld1194_
FROM _Document437 T1608
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1609
INNER JOIN _Reference79 T1610
ON (T1609._Fld2999 = Документ.ИнвентаризацияРасчетовСКонтрагентами::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1611
WHERE ((T1611._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1611._Fld26433_TYPE = \\010::bytea AND T1611._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1611._Fld26433_RRRef = T1609._IDRRef) AND (T1611._Fld26434RRef = T1610._IDRRef))) AND T1610._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1610._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1614
WHERE ((T1614._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1614._Fld22973RRef = T1610._IDRRef) AND (T1614._Fld22974_TYPE = \\010::bytea AND T1614._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1614._Fld22974_RRRef = T1608._Fld12228RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1615
WHERE ((T1615._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1615._Fld22980RRef = T1610._IDRRef) AND T1615._Fld22981_TYPE = \\010::bytea AND T1615._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1615._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1608._Fld1194 = CAST(0 AS NUMERIC))) T1607
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\265::bytea AND T1._Fld22706_RRRef = T1607.IDRRef
LEFT OUTER JOIN _Document559 T1616
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002/::bytea AND T1._Fld22706_RRRef = T1616._IDRRef) AND (T1616._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference83 T1617
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000S::bytea AND T1._Fld22706_RRRef = T1617._IDRRef) AND (T1617._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document30910 T1618
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\276::bytea AND T1._Fld22706_RRRef = T1618._IDRRef) AND (T1618._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference74 T1619
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000J::bytea AND T1._Fld22706_RRRef = T1619._IDRRef) AND (T1619._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1621._Marked AS Marked_,
T1621._IDRRef AS IDRRef,
T1621._Fld18083RRef AS Fld18083RRef,
T1621._Fld1194 AS Fld1194_
FROM _Document558 T1621
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1622
INNER JOIN _Reference79 T1623
ON (T1622._Fld2999 = Документ.СправкиПоНДФЛДляРасчетаПоНалогуНаПрибыль::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1624
WHERE ((T1624._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1624._Fld26433_TYPE = \\010::bytea AND T1624._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1624._Fld26433_RRRef = T1622._IDRRef) AND (T1624._Fld26434RRef = T1623._IDRRef))) AND T1623._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1623._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document558_VT18181 T1627
WHERE ((T1627._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1621._IDRRef = T1627._Document558_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1628
WHERE ((T1628._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1628._Fld22973RRef = T1623._IDRRef) AND (T1628._Fld22974_TYPE = \\010::bytea AND T1628._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1628._Fld22974_RRRef = T1621._Fld18083RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1629
WHERE ((T1629._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1629._Fld22980RRef = T1623._IDRRef) AND T1629._Fld22981_TYPE = \\010::bytea AND T1629._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1629._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1621._Fld1194 = CAST(0 AS NUMERIC))) T1620
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002.::bytea AND T1._Fld22706_RRRef = T1620.IDRRef
LEFT OUTER JOIN (SELECT
T1631._Marked AS Marked_,
T1631._IDRRef AS IDRRef,
T1631._Fld48742RRef AS Fld48742RRef,
T1631._Fld1194 AS Fld1194_
FROM _Document45561 T1631
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1632
INNER JOIN _Reference79 T1633
ON (T1632._Fld2999 = Документ.ЗаявкаНаРасходованиеДенежныхСредств::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1634
WHERE ((T1634._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1634._Fld26433_TYPE = \\010::bytea AND T1634._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1634._Fld26433_RRRef = T1632._IDRRef) AND (T1634._Fld26434RRef = T1633._IDRRef))) AND T1633._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1633._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1637
WHERE ((T1637._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1637._Fld22973RRef = T1633._IDRRef) AND (T1637._Fld22974_TYPE = \\010::bytea AND T1637._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1637._Fld22974_RRRef = T1631._Fld48742RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1638
WHERE ((T1638._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1638._Fld22980RRef = T1633._IDRRef) AND T1638._Fld22981_TYPE = \\010::bytea AND T1638._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1638._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1631._Fld1194 = CAST(0 AS NUMERIC))) T1630
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\371::bytea AND T1._Fld22706_RRRef = T1630.IDRRef
LEFT OUTER JOIN _Reference275 T1639
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\023::bytea AND T1._Fld22706_RRRef = T1639._IDRRef) AND (T1639._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference200 T1640
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\310::bytea AND T1._Fld22706_RRRef = T1640._IDRRef) AND (T1640._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference61 T1641
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000=::bytea AND T1._Fld22706_RRRef = T1641._IDRRef) AND (T1641._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference361 T1642
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001i::bytea AND T1._Fld22706_RRRef = T1642._IDRRef
LEFT OUTER JOIN (SELECT
T1644._Marked AS Marked_,
T1644._IDRRef AS IDRRef,
T1644._Fld1194 AS Fld1194_,
T1644._Fld10347RRef AS Fld10347RRef
FROM _Document386 T1644
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1645
INNER JOIN _Reference79 T1646
ON (T1645._Fld2999 = Документ.ВедомостьНаВыплатуЗарплаты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1647
WHERE ((T1647._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1647._Fld26433_TYPE = \\010::bytea AND T1647._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1647._Fld26433_RRRef = T1645._IDRRef) AND (T1647._Fld26434RRef = T1646._IDRRef))) AND T1646._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1646._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document386_VT10357 T1650
WHERE ((T1650._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1644._IDRRef = T1650._Document386_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1651
WHERE ((T1651._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1651._Fld22973RRef = T1646._IDRRef) AND (T1651._Fld22974_TYPE = \\010::bytea AND T1651._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1651._Fld22974_RRRef = T1644._Fld10347RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1652
WHERE ((T1652._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1652._Fld22980RRef = T1646._IDRRef) AND T1652._Fld22981_TYPE = \\010::bytea AND T1652._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1652._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1644._Fld1194 = CAST(0 AS NUMERIC))) T1643
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\202::bytea AND T1._Fld22706_RRRef = T1643.IDRRef
LEFT OUTER JOIN (SELECT
T1654._Marked AS Marked_,
T1654._IDRRef AS IDRRef,
T1654._Fld9593RRef AS Fld9593RRef,
T1654._Fld9592RRef AS Fld9592RRef,
T1654._Fld1194 AS Fld1194_
FROM _Document384 T1654
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1655
INNER JOIN _Reference79 T1656
ON (T1655._Fld2999 = Документ.БольничныйЛист::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1657
WHERE ((T1657._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1657._Fld26433_TYPE = \\010::bytea AND T1657._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1657._Fld26433_RRRef = T1655._IDRRef) AND (T1657._Fld26434RRef = T1656._IDRRef))) AND T1656._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1656._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1660
WHERE ((T1660._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1660._Fld22973RRef = T1656._IDRRef) AND (T1660._Fld22974_TYPE = \\010::bytea AND T1660._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1660._Fld22974_RRRef = T1654._Fld9592RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1661
WHERE ((T1661._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1661._Fld22980RRef = T1656._IDRRef) AND T1661._Fld22981_TYPE = \\010::bytea AND T1661._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1661._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1654._Fld1194 = CAST(0 AS NUMERIC))) T1653
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\200::bytea AND T1._Fld22706_RRRef = T1653.IDRRef
LEFT OUTER JOIN _Document383 T1662
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\177::bytea AND T1._Fld22706_RRRef = T1662._IDRRef) AND (T1662._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1664._Marked AS Marked_,
T1664._IDRRef AS IDRRef,
T1664._Fld13817RRef AS Fld13817RRef,
T1664._Fld1194 AS Fld1194_
FROM _Document472 T1664
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1665
INNER JOIN _Reference79 T1666
ON (T1665._Fld2999 = Документ.ОтчетКомиссионераОПродажах::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1667
WHERE ((T1667._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1667._Fld26433_TYPE = \\010::bytea AND T1667._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1667._Fld26433_RRRef = T1665._IDRRef) AND (T1667._Fld26434RRef = T1666._IDRRef))) AND T1666._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1666._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1670
WHERE ((T1670._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1670._Fld22973RRef = T1666._IDRRef) AND (T1670._Fld22974_TYPE = \\010::bytea AND T1670._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1670._Fld22974_RRRef = T1664._Fld13817RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1671
WHERE ((T1671._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1671._Fld22980RRef = T1666._IDRRef) AND T1671._Fld22981_TYPE = \\010::bytea AND T1671._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1671._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1664._Fld1194 = CAST(0 AS NUMERIC))) T1663
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\330::bytea AND T1._Fld22706_RRRef = T1663.IDRRef
LEFT OUTER JOIN (SELECT
T1673._Marked AS Marked_,
T1673._IDRRef AS IDRRef,
T1673._Fld17597RRef AS Fld17597RRef,
T1673._Fld1194 AS Fld1194_
FROM _Document551 T1673
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1674
INNER JOIN _Reference79 T1675
ON (T1674._Fld2999 = Документ.СписаниеНДС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1676
WHERE ((T1676._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1676._Fld26433_TYPE = \\010::bytea AND T1676._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1676._Fld26433_RRRef = T1674._IDRRef) AND (T1676._Fld26434RRef = T1675._IDRRef))) AND T1675._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1675._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1679
WHERE ((T1679._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1679._Fld22973RRef = T1675._IDRRef) AND (T1679._Fld22974_TYPE = \\010::bytea AND T1679._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1679._Fld22974_RRRef = T1673._Fld17597RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1680
WHERE ((T1680._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1680._Fld22980RRef = T1675._IDRRef) AND T1680._Fld22981_TYPE = \\010::bytea AND T1680._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1680._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1673._Fld1194 = CAST(0 AS NUMERIC))) T1672
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002::bytea AND T1._Fld22706_RRRef = T1672.IDRRef
LEFT OUTER JOIN _Reference30899 T1681
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\263::bytea AND T1._Fld22706_RRRef = T1681._IDRRef) AND (T1681._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document45596 T1682
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262\\034::bytea AND T1._Fld22706_RRRef = T1682._IDRRef) AND (T1682._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45509 T1683
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\305::bytea AND T1._Fld22706_RRRef = T1683._IDRRef) AND (T1683._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference295 T1684
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001::bytea AND T1._Fld22706_RRRef = T1684._IDRRef) AND (T1684._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1686._Marked AS Marked_,
T1686._IDRRef AS IDRRef,
T1686._Fld13961RRef AS Fld13961RRef,
T1686._Fld1194 AS Fld1194_
FROM _Document473 T1686
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1687
INNER JOIN _Reference79 T1688
ON (T1687._Fld2999 = Документ.ОтчетКомитентуОПродажах::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1689
WHERE ((T1689._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1689._Fld26433_TYPE = \\010::bytea AND T1689._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1689._Fld26433_RRRef = T1687._IDRRef) AND (T1689._Fld26434RRef = T1688._IDRRef))) AND T1688._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1688._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1692
WHERE ((T1692._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1692._Fld22973RRef = T1688._IDRRef) AND (T1692._Fld22974_TYPE = \\010::bytea AND T1692._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1692._Fld22974_RRRef = T1686._Fld13961RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1693
WHERE ((T1693._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1693._Fld22980RRef = T1688._IDRRef) AND T1693._Fld22981_TYPE = \\010::bytea AND T1693._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1693._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1686._Fld1194 = CAST(0 AS NUMERIC))) T1685
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\331::bytea AND T1._Fld22706_RRRef = T1685.IDRRef
LEFT OUTER JOIN (SELECT
T1695._Marked AS Marked_,
T1695._IDRRef AS IDRRef,
T1695._Fld15338RRef AS Fld15338RRef,
T1695._Fld1194 AS Fld1194_
FROM _Document507 T1695
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1696
INNER JOIN _Reference79 T1697
ON (T1696._Fld2999 = Документ.ПодготовкаКПередачеОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1698
WHERE ((T1698._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1698._Fld26433_TYPE = \\010::bytea AND T1698._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1698._Fld26433_RRRef = T1696._IDRRef) AND (T1698._Fld26434RRef = T1697._IDRRef))) AND T1697._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1697._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1701
WHERE ((T1701._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1701._Fld22973RRef = T1697._IDRRef) AND (T1701._Fld22974_TYPE = \\010::bytea AND T1701._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1701._Fld22974_RRRef = T1695._Fld15338RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1702
WHERE ((T1702._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1702._Fld22980RRef = T1697._IDRRef) AND T1702._Fld22981_TYPE = \\010::bytea AND T1702._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1702._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1695._Fld1194 = CAST(0 AS NUMERIC))) T1694
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\373::bytea AND T1._Fld22706_RRRef = T1694.IDRRef
LEFT OUTER JOIN (SELECT
T1704._Marked AS Marked_,
T1704._IDRRef AS IDRRef,
T1704._Fld32775RRef AS Fld32775RRef,
T1704._Fld1194 AS Fld1194_
FROM _Document32752 T1704
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1705
INNER JOIN _Reference79 T1706
ON (T1705._Fld2999 = Документ.ПисьмоОбменСБанками::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1707
WHERE ((T1707._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1707._Fld26433_TYPE = \\010::bytea AND T1707._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1707._Fld26433_RRRef = T1705._IDRRef) AND (T1707._Fld26434RRef = T1706._IDRRef))) AND T1706._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1706._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1710
WHERE ((T1710._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1710._Fld22973RRef = T1706._IDRRef) AND (T1710._Fld22974_TYPE = \\010::bytea AND T1710._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1710._Fld22974_RRRef = T1704._Fld32775RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1711
WHERE ((T1711._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1711._Fld22980RRef = T1706._IDRRef) AND T1711._Fld22981_TYPE = \\010::bytea AND T1711._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1711._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1704._Fld1194 = CAST(0 AS NUMERIC))) T1703
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\360::bytea AND T1._Fld22706_RRRef = T1703.IDRRef
LEFT OUTER JOIN (SELECT
T1713._Marked AS Marked_,
T1713._IDRRef AS IDRRef,
T1713._Fld1194 AS Fld1194_,
T1713._Fld11895RRef AS Fld11895RRef
FROM _Document425 T1713
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1714
INNER JOIN _Reference79 T1715
ON (T1714._Fld2999 = Документ.ЗаявлениеОПодтвержденииПраваНаЗачетАвансовПоНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1716
WHERE ((T1716._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1716._Fld26433_TYPE = \\010::bytea AND T1716._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1716._Fld26433_RRRef = T1714._IDRRef) AND (T1716._Fld26434RRef = T1715._IDRRef))) AND T1715._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1715._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document425_VT11907 T1719
WHERE ((T1719._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1713._IDRRef = T1719._Document425_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1720
WHERE ((T1720._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1720._Fld22973RRef = T1715._IDRRef) AND (T1720._Fld22974_TYPE = \\010::bytea AND T1720._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1720._Fld22974_RRRef = T1713._Fld11895RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1721
WHERE ((T1721._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1721._Fld22980RRef = T1715._IDRRef) AND T1721._Fld22981_TYPE = \\010::bytea AND T1721._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1721._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1713._Fld1194 = CAST(0 AS NUMERIC))) T1712
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\251::bytea AND T1._Fld22706_RRRef = T1712.IDRRef
LEFT OUTER JOIN _Reference45288 T1722
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\350::bytea AND T1._Fld22706_RRRef = T1722._IDRRef) AND (T1722._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1724._Marked AS Marked_,
T1724._IDRRef AS IDRRef,
T1724._Fld9455RRef AS Fld9455RRef,
T1724._Fld1194 AS Fld1194_
FROM _Document381 T1724
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1725
INNER JOIN _Reference79 T1726
ON (T1725._Fld2999 = Документ.АктПроверкиСтраховыхВзносов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1727
WHERE ((T1727._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1727._Fld26433_TYPE = \\010::bytea AND T1727._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1727._Fld26433_RRRef = T1725._IDRRef) AND (T1727._Fld26434RRef = T1726._IDRRef))) AND T1726._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1726._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document381_VT9515 T1730
WHERE ((T1730._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1724._IDRRef = T1730._Document381_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1731
WHERE ((T1731._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1731._Fld22973RRef = T1726._IDRRef) AND (T1731._Fld22974_TYPE = \\010::bytea AND T1731._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1731._Fld22974_RRRef = T1724._Fld9455RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1732
WHERE ((T1732._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1732._Fld22980RRef = T1726._IDRRef) AND T1732._Fld22981_TYPE = \\010::bytea AND T1732._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1732._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1724._Fld1194 = CAST(0 AS NUMERIC))) T1723
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001}::bytea AND T1._Fld22706_RRRef = T1723.IDRRef
LEFT OUTER JOIN _Reference30896 T1733
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\260::bytea AND T1._Fld22706_RRRef = T1733._IDRRef) AND (T1733._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference125 T1734
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000}::bytea AND T1._Fld22706_RRRef = T1734._IDRRef) AND (T1734._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference43 T1735
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000+::bytea AND T1._Fld22706_RRRef = T1735._IDRRef) AND (T1735._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1737._OwnerIDRRef AS OwnerIDRRef,
T1737._Marked AS Marked_,
T1737._IDRRef AS IDRRef,
T1737._Fld5537RRef AS Fld5537RRef,
T1737._Fld1194 AS Fld1194_
FROM _Reference205 T1737
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T1738
ON ((T1737._Fld5537RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) AND ((T1737._Fld5537RRef = T1738._Fld4110RRef) OR (T1737._Fld5537RRef = T1738._IDRRef)) OR ((T1737._OwnerIDRRef = T1738._Fld4110RRef) OR (T1737._OwnerIDRRef = T1738._IDRRef))) AND (T1738._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference159 T1739
ON (T1737._OwnerIDRRef = T1739._IDRRef) AND (T1739._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1740
INNER JOIN _Reference79 T1741
ON (T1740._Fld2999 = Справочник.ПодразделенияОрганизаций::mvarchar) AND EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg26432 T1742
WHERE ((T1742._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1742._Fld26433_TYPE = \\010::bytea AND T1742._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1742._Fld26433_RRRef = T1740._IDRRef) AND (T1742._Fld26434RRef = T1741._IDRRef))) AND T1741._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1741._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1745
WHERE ((T1745._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1745._Fld22973RRef = T1741._IDRRef) AND (T1745._Fld22974_TYPE = \\010::bytea AND T1745._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1745._Fld22974_RRRef = T1737._OwnerIDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1746
WHERE ((T1746._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1746._Fld22980RRef = T1741._IDRRef) AND T1746._Fld22981_TYPE = \\010::bytea AND T1746._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1746._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((T1739._Fld4110RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T1747
WHERE ((T1747._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1747._Fld22973RRef = T1741._IDRRef) AND (T1747._Fld22974_TYPE = \\010::bytea AND T1747._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1747._Fld22974_RRRef = T1739._Fld4110RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T1748
WHERE ((T1748._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1748._Fld22980RRef = T1741._IDRRef) AND T1748._Fld22981_TYPE = CASE WHEN T1739._Fld4110RRef IS NOT NULL THEN \\010::bytea END AND T1748._Fld22981_RTRef = CASE WHEN T1739._Fld4110RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1748._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (T1739._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR ((T1738._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg22972 T1749
WHERE ((T1749._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1749._Fld22973RRef = T1741._IDRRef) AND (T1749._Fld22974_TYPE = \\010::bytea AND T1749._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1749._Fld22974_RRRef = T1738._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _InfoRg22979 T1750
WHERE ((T1750._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1750._Fld22980RRef = T1741._IDRRef) AND T1750._Fld22981_TYPE = CASE WHEN T1738._IDRRef IS NOT NULL THEN \\010::bytea END AND T1750._Fld22981_RTRef = CASE WHEN T1738._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1750._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1737._Fld1194 = CAST(0 AS NUMERIC))) T1736
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\315::bytea AND T1._Fld22706_RRRef = T1736.IDRRef
LEFT OUTER JOIN _Reference45442 T1751
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\202::bytea AND T1._Fld22706_RRRef = T1751._IDRRef) AND (T1751._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45378 T1752
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261B::bytea AND T1._Fld22706_RRRef = T1752._IDRRef) AND (T1752._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1754._Marked AS Marked_,
T1754._IDRRef AS IDRRef,
T1754._Fld38087RRef AS Fld38087RRef,
T1754._Fld1194 AS Fld1194_
FROM _Document38080 T1754
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1755
INNER JOIN _Reference79 T1756
ON (T1755._Fld2999 = Документ.ЗаявленияОПредоставленииСведенийОТрудовойДеятельности::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1757
WHERE ((T1757._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1757._Fld26433_TYPE = \\010::bytea AND T1757._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1757._Fld26433_RRRef = T1755._IDRRef) AND (T1757._Fld26434RRef = T1756._IDRRef))) AND T1756._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1756._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document38080_VT38098 T1760
WHERE ((T1760._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1754._IDRRef = T1760._Document38080_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1761
WHERE ((T1761._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1761._Fld22973RRef = T1756._IDRRef) AND (T1761._Fld22974_TYPE = \\010::bytea AND T1761._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1761._Fld22974_RRRef = T1754._Fld38087RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1762
WHERE ((T1762._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1762._Fld22980RRef = T1756._IDRRef) AND T1762._Fld22981_TYPE = \\010::bytea AND T1762._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1762._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1754._Fld1194 = CAST(0 AS NUMERIC))) T1753
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\224\\300::bytea AND T1._Fld22706_RRRef = T1753.IDRRef
LEFT OUTER JOIN (SELECT
T1764._Marked AS Marked_,
T1764._IDRRef AS IDRRef,
T1764._Fld13522RRef AS Fld13522RRef,
T1764._Fld13519RRef AS Fld13519RRef,
T1764._Fld1194 AS Fld1194_
FROM _Document466 T1764
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1765
INNER JOIN _Reference79 T1766
ON (T1765._Fld2999 = Документ.ОтзывСогласияНаОбработкуПерсональныхДанных::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1767
WHERE ((T1767._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1767._Fld26433_TYPE = \\010::bytea AND T1767._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1767._Fld26433_RRRef = T1765._IDRRef) AND (T1767._Fld26434RRef = T1766._IDRRef))) AND T1766._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1766._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1770
WHERE ((T1770._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1770._Fld22973RRef = T1766._IDRRef) AND (T1770._Fld22974_TYPE = \\010::bytea AND T1770._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1770._Fld22974_RRRef = T1764._Fld13519RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1771
WHERE ((T1771._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1771._Fld22980RRef = T1766._IDRRef) AND T1771._Fld22981_TYPE = \\010::bytea AND T1771._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1771._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1764._Fld1194 = CAST(0 AS NUMERIC))) T1763
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\322::bytea AND T1._Fld22706_RRRef = T1763.IDRRef
LEFT OUTER JOIN (SELECT
T1773._Marked AS Marked_,
T1773._IDRRef AS IDRRef,
T1773._Fld34375RRef AS Fld34375RRef,
T1773._Fld1194 AS Fld1194_
FROM _Reference34045 T1773
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document421 T1774
ON (T1773._Fld34375RRef = T1774._IDRRef) AND (T1774._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1775
INNER JOIN _Reference79 T1776
ON (T1775._Fld2999 = Справочник.ЗаявлениеВФССОВозмещенииВыплатРодителямДетейИнвалидовПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1777
WHERE ((T1777._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1777._Fld26433_TYPE = \\010::bytea AND T1777._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1777._Fld26433_RRRef = T1775._IDRRef) AND (T1777._Fld26434RRef = T1776._IDRRef))) AND T1776._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1776._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document421_VT11766 T1780
WHERE ((T1780._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1773._Fld34375RRef = T1780._Document421_IDRRef) AND (NOT (((1=1))))))))) AND ((T1774._Fld11731RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1781
WHERE ((T1781._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1781._Fld22973RRef = T1776._IDRRef) AND (T1781._Fld22974_TYPE = \\010::bytea AND T1781._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1781._Fld22974_RRRef = T1774._Fld11731RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1782
WHERE ((T1782._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1782._Fld22980RRef = T1776._IDRRef) AND T1782._Fld22981_TYPE = CASE WHEN T1774._Fld11731RRef IS NOT NULL THEN \\010::bytea END AND T1782._Fld22981_RTRef = CASE WHEN T1774._Fld11731RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1782._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1773._Fld1194 = CAST(0 AS NUMERIC))) T1772
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\375::bytea AND T1._Fld22706_RRRef = T1772.IDRRef
LEFT OUTER JOIN _Reference108 T1783
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000l::bytea AND T1._Fld22706_RRRef = T1783._IDRRef) AND (T1783._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45306 T1784
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\372::bytea AND T1._Fld22706_RRRef = T1784._IDRRef) AND (T1784._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference41234 T1785
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\241\\022::bytea AND T1._Fld22706_RRRef = T1785._IDRRef) AND (T1785._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1787._Marked AS Marked_,
T1787._IDRRef AS IDRRef,
T1787._Fld39373RRef AS Fld39373RRef,
T1787._Fld1194 AS Fld1194_
FROM _Document39368 T1787
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1788
INNER JOIN _Reference79 T1789
ON (T1788._Fld2999 = Документ.ЗаявкиНаЛьготныйКредит::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1790
WHERE ((T1790._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1790._Fld26433_TYPE = \\010::bytea AND T1790._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1790._Fld26433_RRRef = T1788._IDRRef) AND (T1790._Fld26434RRef = T1789._IDRRef))) AND T1789._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1789._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1793
WHERE ((T1793._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1793._Fld22973RRef = T1789._IDRRef) AND (T1793._Fld22974_TYPE = \\010::bytea AND T1793._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1793._Fld22974_RRRef = T1787._Fld39373RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1794
WHERE ((T1794._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1794._Fld22980RRef = T1789._IDRRef) AND T1794._Fld22981_TYPE = \\010::bytea AND T1794._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1794._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1787._Fld1194 = CAST(0 AS NUMERIC))) T1786
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\231\\310::bytea AND T1._Fld22706_RRRef = T1786.IDRRef
LEFT OUTER JOIN _Reference40941 T1795
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\355::bytea AND T1._Fld22706_RRRef = T1795._IDRRef) AND (T1795._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1797._Marked AS Marked_,
T1797._IDRRef AS IDRRef,
T1797._Fld18390RRef AS Fld18390RRef,
T1797._Fld1194 AS Fld1194_
FROM _Document563 T1797
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1798
INNER JOIN _Reference79 T1799
ON (T1798._Fld2999 = Документ.СчетФактураПолученный::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1800
WHERE ((T1800._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1800._Fld26433_TYPE = \\010::bytea AND T1800._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1800._Fld26433_RRRef = T1798._IDRRef) AND (T1800._Fld26434RRef = T1799._IDRRef))) AND T1799._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1799._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1803
WHERE ((T1803._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1803._Fld22973RRef = T1799._IDRRef) AND (T1803._Fld22974_TYPE = \\010::bytea AND T1803._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1803._Fld22974_RRRef = T1797._Fld18390RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1804
WHERE ((T1804._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1804._Fld22980RRef = T1799._IDRRef) AND T1804._Fld22981_TYPE = \\010::bytea AND T1804._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1804._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1797._Fld1194 = CAST(0 AS NUMERIC))) T1796
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0023::bytea AND T1._Fld22706_RRRef = T1796.IDRRef
LEFT OUTER JOIN _Reference45456 T1805
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\220::bytea AND T1._Fld22706_RRRef = T1805._IDRRef) AND (T1805._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1807._Marked AS Marked_,
T1807._IDRRef AS IDRRef,
T1807._Fld9758RRef AS Fld9758RRef,
T1807._Fld1194 AS Fld1194_
FROM _Document385 T1807
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1808
INNER JOIN _Reference79 T1809
ON (T1808._Fld2999 = Документ.ВводНачальныхОстатков::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1810
WHERE ((T1810._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1810._Fld26433_TYPE = \\010::bytea AND T1810._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1810._Fld26433_RRRef = T1808._IDRRef) AND (T1810._Fld26434RRef = T1809._IDRRef))) AND T1809._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1809._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1813
WHERE ((T1813._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1813._Fld22973RRef = T1809._IDRRef) AND (T1813._Fld22974_TYPE = \\010::bytea AND T1813._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1813._Fld22974_RRRef = T1807._Fld9758RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1814
WHERE ((T1814._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1814._Fld22980RRef = T1809._IDRRef) AND T1814._Fld22981_TYPE = \\010::bytea AND T1814._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1814._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1807._Fld1194 = CAST(0 AS NUMERIC))) T1806
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\201::bytea AND T1._Fld22706_RRRef = T1806.IDRRef
LEFT OUTER JOIN _Reference39717 T1815
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\233%::bytea AND T1._Fld22706_RRRef = T1815._IDRRef) AND (T1815._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document37388 T1816
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\014::bytea AND T1._Fld22706_RRRef = T1816._IDRRef) AND (T1816._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document30908 T1817
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\274::bytea AND T1._Fld22706_RRRef = T1817._IDRRef) AND (T1817._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1819._Marked AS Marked_,
T1819._IDRRef AS IDRRef,
T1819._Fld12096RRef AS Fld12096RRef,
T1819._Fld1194 AS Fld1194_
FROM _Document428 T1819
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1820
INNER JOIN _Reference79 T1821
ON (T1820._Fld2999 = Документ.ИзменениеОтраженияРасходовПоАренднымПлатежамОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1822
WHERE ((T1822._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1822._Fld26433_TYPE = \\010::bytea AND T1822._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1822._Fld26433_RRRef = T1820._IDRRef) AND (T1822._Fld26434RRef = T1821._IDRRef))) AND T1821._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1821._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1825
WHERE ((T1825._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1825._Fld22973RRef = T1821._IDRRef) AND (T1825._Fld22974_TYPE = \\010::bytea AND T1825._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1825._Fld22974_RRRef = T1819._Fld12096RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1826
WHERE ((T1826._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1826._Fld22980RRef = T1821._IDRRef) AND T1826._Fld22981_TYPE = \\010::bytea AND T1826._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1826._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1819._Fld1194 = CAST(0 AS NUMERIC))) T1818
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\254::bytea AND T1._Fld22706_RRRef = T1818.IDRRef
LEFT OUTER JOIN (SELECT
T1828._Marked AS Marked_,
T1828._IDRRef AS IDRRef,
T1828._Fld1194 AS Fld1194_,
T1828._Fld10896RRef AS Fld10896RRef
FROM _Document403 T1828
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1829
INNER JOIN _Reference79 T1830
ON (T1829._Fld2999 = Документ.ВыработкаОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1831
WHERE ((T1831._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1831._Fld26433_TYPE = \\010::bytea AND T1831._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1831._Fld26433_RRRef = T1829._IDRRef) AND (T1831._Fld26434RRef = T1830._IDRRef))) AND T1830._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1830._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1834
WHERE ((T1834._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1834._Fld22973RRef = T1830._IDRRef) AND (T1834._Fld22974_TYPE = \\010::bytea AND T1834._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1834._Fld22974_RRRef = T1828._Fld10896RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1835
WHERE ((T1835._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1835._Fld22980RRef = T1830._IDRRef) AND T1835._Fld22981_TYPE = \\010::bytea AND T1835._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1835._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1828._Fld1194 = CAST(0 AS NUMERIC))) T1827
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\223::bytea AND T1._Fld22706_RRRef = T1827.IDRRef
LEFT OUTER JOIN _Reference163 T1836
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\243::bytea AND T1._Fld22706_RRRef = T1836._IDRRef
LEFT OUTER JOIN (SELECT
T1838._Marked AS Marked_,
T1838._IDRRef AS IDRRef,
T1838._Fld12283RRef AS Fld12283RRef,
T1838._Fld12282RRef AS Fld12282RRef,
T1838._Fld1194 AS Fld1194_
FROM _Document439 T1838
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1839
INNER JOIN _Reference79 T1840
ON (T1839._Fld2999 = Документ.ИсполнительныйЛист::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1841
WHERE ((T1841._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1841._Fld26433_TYPE = \\010::bytea AND T1841._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1841._Fld26433_RRRef = T1839._IDRRef) AND (T1841._Fld26434RRef = T1840._IDRRef))) AND T1840._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1840._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1844
WHERE ((T1844._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1844._Fld22973RRef = T1840._IDRRef) AND (T1844._Fld22974_TYPE = \\010::bytea AND T1844._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1844._Fld22974_RRRef = T1838._Fld12282RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1845
WHERE ((T1845._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1845._Fld22980RRef = T1840._IDRRef) AND T1845._Fld22981_TYPE = \\010::bytea AND T1845._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1845._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1838._Fld1194 = CAST(0 AS NUMERIC))) T1837
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\267::bytea AND T1._Fld22706_RRRef = T1837.IDRRef
LEFT OUTER JOIN _Document584 T1846
ON ((T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002H::bytea AND T1._Fld22706_RRRef = T1846._IDRRef) AND (T1846._Fld1194 = CAST(0 AS NUMERIC))) AND (1=0)
LEFT OUTER JOIN (SELECT
T1848._Marked AS Marked_,
T1848._IDRRef AS IDRRef,
T1848._Fld9261RRef AS Fld9261RRef,
T1848._Fld9257RRef AS Fld9257RRef,
T1848._Fld1194 AS Fld1194_
FROM _Document375 T1848
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1849
INNER JOIN _Reference79 T1850
ON (T1849._Fld2999 = Документ.АвизоПрочееВходящее::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T1851
WHERE ((T1851._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1851._Fld26433_TYPE = \\010::bytea AND T1851._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1851._Fld26433_RRRef = T1849._IDRRef) AND (T1851._Fld26434RRef = T1850._IDRRef))) AND T1850._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1850._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1854
WHERE ((T1854._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1854._Fld22973RRef = T1850._IDRRef) AND (T1854._Fld22974_TYPE = \\010::bytea AND T1854._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1854._Fld22974_RRRef = T1848._Fld9257RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1855
WHERE ((T1855._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1855._Fld22980RRef = T1850._IDRRef) AND T1855._Fld22981_TYPE = \\010::bytea AND T1855._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1855._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T1856
WHERE ((T1856._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1856._Fld22973RRef = T1850._IDRRef) AND (T1856._Fld22974_TYPE = \\010::bytea AND T1856._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1856._Fld22974_RRRef = T1848._Fld9261RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T1857
WHERE ((T1857._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1857._Fld22980RRef = T1850._IDRRef) AND T1857._Fld22981_TYPE = \\010::bytea AND T1857._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1857._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1848._Fld1194 = CAST(0 AS NUMERIC))) T1847
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001w::bytea AND T1._Fld22706_RRRef = T1847.IDRRef
LEFT OUTER JOIN _Reference96 T1858
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000`::bytea AND T1._Fld22706_RRRef = T1858._IDRRef
LEFT OUTER JOIN (SELECT
T1860._Marked AS Marked_,
T1860._IDRRef AS IDRRef,
T1860._Fld14949RRef AS Fld14949RRef,
T1860._Fld1194 AS Fld1194_
FROM _Document496 T1860
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1861
INNER JOIN _Reference79 T1862
ON (T1861._Fld2999 = Документ.ПередачаОборудованияВМонтаж::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1863
WHERE ((T1863._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1863._Fld26433_TYPE = \\010::bytea AND T1863._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1863._Fld26433_RRRef = T1861._IDRRef) AND (T1863._Fld26434RRef = T1862._IDRRef))) AND T1862._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1862._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1866
WHERE ((T1866._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1866._Fld22973RRef = T1862._IDRRef) AND (T1866._Fld22974_TYPE = \\010::bytea AND T1866._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1866._Fld22974_RRRef = T1860._Fld14949RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1867
WHERE ((T1867._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1867._Fld22980RRef = T1862._IDRRef) AND T1867._Fld22981_TYPE = \\010::bytea AND T1867._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1867._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1860._Fld1194 = CAST(0 AS NUMERIC))) T1859
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\360::bytea AND T1._Fld22706_RRRef = T1859.IDRRef
LEFT OUTER JOIN _Reference30893 T1868
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\255::bytea AND T1._Fld22706_RRRef = T1868._IDRRef) AND (T1868._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference29758 T1869
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000t>::bytea AND T1._Fld22706_RRRef = T1869._IDRRef) AND (T1869._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45286 T1870
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\346::bytea AND T1._Fld22706_RRRef = T1870._IDRRef) AND (T1870._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document465 T1871
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\321::bytea AND T1._Fld22706_RRRef = T1871._IDRRef) AND (T1871._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1873._Marked AS Marked_,
T1873._IDRRef AS IDRRef,
T1873._Fld1849RRef AS Fld1849RRef,
T1873._Fld1194 AS Fld1194_
FROM _Reference49 T1873
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document388 T1874
ON (T1873._Fld1849RRef = T1874._IDRRef) AND (T1874._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1875
INNER JOIN _Reference79 T1876
ON (T1875._Fld2999 = Справочник.ВедомостьНаВыплатуЗарплатыВКассуПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1877
WHERE ((T1877._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1877._Fld26433_TYPE = \\010::bytea AND T1877._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1877._Fld26433_RRRef = T1875._IDRRef) AND (T1877._Fld26434RRef = T1876._IDRRef))) AND T1876._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1876._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document388_VT10442 T1880
WHERE ((T1880._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1873._Fld1849RRef = T1880._Document388_IDRRef) AND (NOT (((1=1))))))))) AND ((T1874._Fld10410RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1881
WHERE ((T1881._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1881._Fld22973RRef = T1876._IDRRef) AND (T1881._Fld22974_TYPE = \\010::bytea AND T1881._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1881._Fld22974_RRRef = T1874._Fld10410RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1882
WHERE ((T1882._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1882._Fld22980RRef = T1876._IDRRef) AND T1882._Fld22981_TYPE = CASE WHEN T1874._Fld10410RRef IS NOT NULL THEN \\010::bytea END AND T1882._Fld22981_RTRef = CASE WHEN T1874._Fld10410RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1882._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1873._Fld1194 = CAST(0 AS NUMERIC))) T1872
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0001::bytea AND T1._Fld22706_RRRef = T1872.IDRRef
LEFT OUTER JOIN _Reference341 T1883
ON ((T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001U::bytea AND T1._Fld22706_RRRef = T1883._IDRRef) AND (T1883._Fld1194 = CAST(0 AS NUMERIC))) AND (1=0)
LEFT OUTER JOIN (SELECT
T1885._Marked AS Marked_,
T1885._IDRRef AS IDRRef,
T1885._Fld14913RRef AS Fld14913RRef,
T1885._Fld1194 AS Fld1194_
FROM _Document495 T1885
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1886
INNER JOIN _Reference79 T1887
ON (T1886._Fld2999 = Документ.ПередачаНМА::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1888
WHERE ((T1888._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1888._Fld26433_TYPE = \\010::bytea AND T1888._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1888._Fld26433_RRRef = T1886._IDRRef) AND (T1888._Fld26434RRef = T1887._IDRRef))) AND T1887._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1887._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1891
WHERE ((T1891._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1891._Fld22973RRef = T1887._IDRRef) AND (T1891._Fld22974_TYPE = \\010::bytea AND T1891._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1891._Fld22974_RRRef = T1885._Fld14913RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1892
WHERE ((T1892._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1892._Fld22980RRef = T1887._IDRRef) AND T1892._Fld22981_TYPE = \\010::bytea AND T1892._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1892._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1885._Fld1194 = CAST(0 AS NUMERIC))) T1884
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\357::bytea AND T1._Fld22706_RRRef = T1884.IDRRef
LEFT OUTER JOIN _Reference224 T1893
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\340::bytea AND T1._Fld22706_RRRef = T1893._IDRRef) AND (T1893._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1895._Marked AS Marked_,
T1895._IDRRef AS IDRRef,
T1895._Fld14064RRef AS Fld14064RRef,
T1895._Fld1194 AS Fld1194_
FROM _Document475 T1895
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1896
INNER JOIN _Reference79 T1897
ON (T1896._Fld2999 = Документ.ОтчетОРозничныхПродажах::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1898
WHERE ((T1898._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1898._Fld26433_TYPE = \\010::bytea AND T1898._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1898._Fld26433_RRRef = T1896._IDRRef) AND (T1898._Fld26434RRef = T1897._IDRRef))) AND T1897._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1897._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1901
WHERE ((T1901._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1901._Fld22973RRef = T1897._IDRRef) AND (T1901._Fld22974_TYPE = \\010::bytea AND T1901._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1901._Fld22974_RRRef = T1895._Fld14064RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1902
WHERE ((T1902._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1902._Fld22980RRef = T1897._IDRRef) AND T1902._Fld22981_TYPE = \\010::bytea AND T1902._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1902._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1895._Fld1194 = CAST(0 AS NUMERIC))) T1894
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\333::bytea AND T1._Fld22706_RRRef = T1894.IDRRef
LEFT OUTER JOIN _Reference147 T1903
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\223::bytea AND T1._Fld22706_RRRef = T1903._IDRRef) AND (T1903._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference69 T1904
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000E::bytea AND T1._Fld22706_RRRef = T1904._IDRRef) AND (T1904._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1906._Marked AS Marked_,
T1906._IDRRef AS IDRRef,
T1906._Fld30117RRef AS Fld30117RRef,
T1906._Fld1194 AS Fld1194_
FROM _Document30111 T1906
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1907
INNER JOIN _Reference79 T1908
ON (T1907._Fld2999 = Документ.НачислениеДивидендов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1909
WHERE ((T1909._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1909._Fld26433_TYPE = \\010::bytea AND T1909._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1909._Fld26433_RRRef = T1907._IDRRef) AND (T1909._Fld26434RRef = T1908._IDRRef))) AND T1908._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1908._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1912
WHERE ((T1912._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1912._Fld22973RRef = T1908._IDRRef) AND (T1912._Fld22974_TYPE = \\010::bytea AND T1912._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1912._Fld22974_RRRef = T1906._Fld30117RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1913
WHERE ((T1913._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1913._Fld22980RRef = T1908._IDRRef) AND T1913._Fld22981_TYPE = \\010::bytea AND T1913._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1913._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1906._Fld1194 = CAST(0 AS NUMERIC))) T1905
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000u\\237::bytea AND T1._Fld22706_RRRef = T1905.IDRRef
LEFT OUTER JOIN _Reference45459 T1914
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\223::bytea AND T1._Fld22706_RRRef = T1914._IDRRef) AND (T1914._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference244 T1915
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\364::bytea AND T1._Fld22706_RRRef = T1915._IDRRef) AND (T1915._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1917._Marked AS Marked_,
T1917._IDRRef AS IDRRef,
T1917._Fld12542RRef AS Fld12542RRef,
T1917._Fld1194 AS Fld1194_
FROM _Document447 T1917
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1918
INNER JOIN _Reference79 T1919
ON (T1918._Fld2999 = Документ.КонтролируемаяСделка::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1920
WHERE ((T1920._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1920._Fld26433_TYPE = \\010::bytea AND T1920._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1920._Fld26433_RRRef = T1918._IDRRef) AND (T1920._Fld26434RRef = T1919._IDRRef))) AND T1919._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1919._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1923
WHERE ((T1923._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1923._Fld22973RRef = T1919._IDRRef) AND (T1923._Fld22974_TYPE = \\010::bytea AND T1923._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1923._Fld22974_RRRef = T1917._Fld12542RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1924
WHERE ((T1924._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1924._Fld22980RRef = T1919._IDRRef) AND T1924._Fld22981_TYPE = \\010::bytea AND T1924._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1924._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1917._Fld1194 = CAST(0 AS NUMERIC))) T1916
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\277::bytea AND T1._Fld22706_RRRef = T1916.IDRRef
LEFT OUTER JOIN _Reference89 T1925
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000Y::bytea AND T1._Fld22706_RRRef = T1925._IDRRef) AND (T1925._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1927._Marked AS Marked_,
T1927._IDRRef AS IDRRef,
T1927._Fld34185RRef AS Fld34185RRef,
T1927._Fld1194 AS Fld1194_
FROM _Reference34040 T1927
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document381 T1928
ON (T1927._Fld34185RRef = T1928._IDRRef) AND (T1928._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1929
INNER JOIN _Reference79 T1930
ON (T1929._Fld2999 = Справочник.АктПроверкиСтраховыхВзносовПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1931
WHERE ((T1931._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1931._Fld26433_TYPE = \\010::bytea AND T1931._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1931._Fld26433_RRRef = T1929._IDRRef) AND (T1931._Fld26434RRef = T1930._IDRRef))) AND T1930._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1930._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document381_VT9515 T1934
WHERE ((T1934._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1927._Fld34185RRef = T1934._Document381_IDRRef) AND (NOT (((1=1))))))))) AND ((T1928._Fld9455RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1935
WHERE ((T1935._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1935._Fld22973RRef = T1930._IDRRef) AND (T1935._Fld22974_TYPE = \\010::bytea AND T1935._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1935._Fld22974_RRRef = T1928._Fld9455RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1936
WHERE ((T1936._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1936._Fld22980RRef = T1930._IDRRef) AND T1936._Fld22981_TYPE = CASE WHEN T1928._Fld9455RRef IS NOT NULL THEN \\010::bytea END AND T1936._Fld22981_RTRef = CASE WHEN T1928._Fld9455RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T1936._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T1927._Fld1194 = CAST(0 AS NUMERIC))) T1926
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\370::bytea AND T1._Fld22706_RRRef = T1926.IDRRef
LEFT OUTER JOIN _Reference45307 T1937
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\373::bytea AND T1._Fld22706_RRRef = T1937._IDRRef) AND (T1937._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1939._Marked AS Marked_,
T1939._IDRRef AS IDRRef,
T1939._Fld16970RRef AS Fld16970RRef,
T1939._Fld1194 AS Fld1194_
FROM _Document537 T1939
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1940
INNER JOIN _Reference79 T1941
ON (T1940._Fld2999 = Документ.РегламентнаяОперация::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1942
WHERE ((T1942._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1942._Fld26433_TYPE = \\010::bytea AND T1942._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1942._Fld26433_RRRef = T1940._IDRRef) AND (T1942._Fld26434RRef = T1941._IDRRef))) AND T1941._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1941._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1945
WHERE ((T1945._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1945._Fld22973RRef = T1941._IDRRef) AND (T1945._Fld22974_TYPE = \\010::bytea AND T1945._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1945._Fld22974_RRRef = T1939._Fld16970RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1946
WHERE ((T1946._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1946._Fld22980RRef = T1941._IDRRef) AND T1946._Fld22981_TYPE = \\010::bytea AND T1946._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1946._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1939._Fld1194 = CAST(0 AS NUMERIC))) T1938
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\031::bytea AND T1._Fld22706_RRRef = T1938.IDRRef
LEFT OUTER JOIN (SELECT
T1948._Marked AS Marked_,
T1948._IDRRef AS IDRRef,
T1948._Fld15149RRef AS Fld15149RRef,
T1948._Fld1194 AS Fld1194_
FROM _Document503 T1948
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1949
INNER JOIN _Reference79 T1950
ON (T1949._Fld2999 = Документ.ПерерасчетНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1951
WHERE ((T1951._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1951._Fld26433_TYPE = \\010::bytea AND T1951._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1951._Fld26433_RRRef = T1949._IDRRef) AND (T1951._Fld26434RRef = T1950._IDRRef))) AND T1950._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1950._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document503_VT15154 T1954
WHERE ((T1954._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1948._IDRRef = T1954._Document503_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1955
WHERE ((T1955._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1955._Fld22973RRef = T1950._IDRRef) AND (T1955._Fld22974_TYPE = \\010::bytea AND T1955._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1955._Fld22974_RRRef = T1948._Fld15149RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1956
WHERE ((T1956._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1956._Fld22980RRef = T1950._IDRRef) AND T1956._Fld22981_TYPE = \\010::bytea AND T1956._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1956._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1948._Fld1194 = CAST(0 AS NUMERIC))) T1947
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\367::bytea AND T1._Fld22706_RRRef = T1947.IDRRef
LEFT OUTER JOIN (SELECT
T1958._Marked AS Marked_,
T1958._IDRRef AS IDRRef,
T1958._Fld15350RRef AS Fld15350RRef,
T1958._Fld1194 AS Fld1194_
FROM _Document508 T1958
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1959
INNER JOIN _Reference79 T1960
ON (T1959._Fld2999 = Документ.ПодтверждениеЗачисленияЗарплаты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1961
WHERE ((T1961._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1961._Fld26433_TYPE = \\010::bytea AND T1961._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1961._Fld26433_RRRef = T1959._IDRRef) AND (T1961._Fld26434RRef = T1960._IDRRef))) AND T1960._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1960._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document508_VT15358 T1964
WHERE ((T1964._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1958._IDRRef = T1964._Document508_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1965
WHERE ((T1965._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1965._Fld22973RRef = T1960._IDRRef) AND (T1965._Fld22974_TYPE = \\010::bytea AND T1965._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1965._Fld22974_RRRef = T1958._Fld15350RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1966
WHERE ((T1966._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1966._Fld22980RRef = T1960._IDRRef) AND T1966._Fld22981_TYPE = \\010::bytea AND T1966._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1966._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1958._Fld1194 = CAST(0 AS NUMERIC))) T1957
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\374::bytea AND T1._Fld22706_RRRef = T1957.IDRRef
LEFT OUTER JOIN (SELECT
T1968._Marked AS Marked_,
T1968._IDRRef AS IDRRef,
T1968._Fld1194 AS Fld1194_,
T1968._Fld10534RRef AS Fld10534RRef
FROM _Document393 T1968
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1969
INNER JOIN _Reference79 T1970
ON (T1969._Fld2999 = Документ.ВозвратОСОтАрендатора::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1971
WHERE ((T1971._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1971._Fld26433_TYPE = \\010::bytea AND T1971._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1971._Fld26433_RRRef = T1969._IDRRef) AND (T1971._Fld26434RRef = T1970._IDRRef))) AND T1970._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1970._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1974
WHERE ((T1974._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1974._Fld22973RRef = T1970._IDRRef) AND (T1974._Fld22974_TYPE = \\010::bytea AND T1974._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1974._Fld22974_RRRef = T1968._Fld10534RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1975
WHERE ((T1975._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1975._Fld22980RRef = T1970._IDRRef) AND T1975._Fld22981_TYPE = \\010::bytea AND T1975._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1975._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1968._Fld1194 = CAST(0 AS NUMERIC))) T1967
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\211::bytea AND T1._Fld22706_RRRef = T1967.IDRRef
LEFT OUTER JOIN _Reference45344 T1976
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261 ::bytea AND T1._Fld22706_RRRef = T1976._IDRRef) AND (T1976._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1978._Marked AS Marked_,
T1978._IDRRef AS IDRRef,
T1978._Fld15418RRef AS Fld15418RRef,
T1978._Fld1194 AS Fld1194_
FROM _Document512 T1978
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1979
INNER JOIN _Reference79 T1980
ON (T1979._Fld2999 = Документ.ПоступлениеВАренду::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T1981
WHERE ((T1981._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1981._Fld26433_TYPE = \\010::bytea AND T1981._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1981._Fld26433_RRRef = T1979._IDRRef) AND (T1981._Fld26434RRef = T1980._IDRRef))) AND T1980._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1980._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T1984
WHERE ((T1984._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1984._Fld22973RRef = T1980._IDRRef) AND (T1984._Fld22974_TYPE = \\010::bytea AND T1984._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1984._Fld22974_RRRef = T1978._Fld15418RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T1985
WHERE ((T1985._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1985._Fld22980RRef = T1980._IDRRef) AND T1985._Fld22981_TYPE = \\010::bytea AND T1985._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1985._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1978._Fld1194 = CAST(0 AS NUMERIC))) T1977
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\000::bytea AND T1._Fld22706_RRRef = T1977.IDRRef
LEFT OUTER JOIN (SELECT
T1987._Marked AS Marked_,
T1987._IDRRef AS IDRRef,
T1987._Fld14248RRef AS Fld14248RRef,
T1987._Fld1194 AS Fld1194_
FROM _Document481 T1987
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1988
INNER JOIN _Reference79 T1989
ON (T1988._Fld2999 = Документ.ПачкаДокументовАДВ_1::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T1990
WHERE ((T1990._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1990._Fld26433_TYPE = \\010::bytea AND T1990._Fld26433_RTRef = \\000\\000\\000j::bytea AND T1990._Fld26433_RRRef = T1988._IDRRef) AND (T1990._Fld26434RRef = T1989._IDRRef))) AND T1989._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T1989._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document481_VT14260 T1993
WHERE ((T1993._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1987._IDRRef = T1993._Document481_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T1994
WHERE ((T1994._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1994._Fld22973RRef = T1989._IDRRef) AND (T1994._Fld22974_TYPE = \\010::bytea AND T1994._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T1994._Fld22974_RRRef = T1987._Fld14248RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T1995
WHERE ((T1995._Fld1194 = CAST(0 AS NUMERIC))) AND ((T1995._Fld22980RRef = T1989._IDRRef) AND T1995._Fld22981_TYPE = \\010::bytea AND T1995._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T1995._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T1987._Fld1194 = CAST(0 AS NUMERIC))) T1986
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\341::bytea AND T1._Fld22706_RRRef = T1986.IDRRef
LEFT OUTER JOIN _Reference153 T1996
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\231::bytea AND T1._Fld22706_RRRef = T1996._IDRRef) AND (T1996._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T1998._Marked AS Marked_,
T1998._IDRRef AS IDRRef,
T1998._Fld16385RRef AS Fld16385RRef,
T1998._Fld16384RRef AS Fld16384RRef,
T1998._Fld1194 AS Fld1194_
FROM _Document524 T1998
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T1999
INNER JOIN _Reference79 T2000
ON (T1999._Fld2999 = Документ.ПриходныйКассовыйОрдер::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2001
WHERE ((T2001._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2001._Fld26433_TYPE = \\010::bytea AND T2001._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2001._Fld26433_RRRef = T1999._IDRRef) AND (T2001._Fld26434RRef = T2000._IDRRef))) AND T2000._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2000._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2004
WHERE ((T2004._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2004._Fld22973RRef = T2000._IDRRef) AND (T2004._Fld22974_TYPE = \\010::bytea AND T2004._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2004._Fld22974_RRRef = T1998._Fld16385RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2005
WHERE ((T2005._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2005._Fld22980RRef = T2000._IDRRef) AND T2005._Fld22981_TYPE = \\010::bytea AND T2005._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2005._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T1998._Fld1194 = CAST(0 AS NUMERIC))) T1997
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\014::bytea AND T1._Fld22706_RRRef = T1997.IDRRef
LEFT OUTER JOIN _Reference286 T2006
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\036::bytea AND T1._Fld22706_RRRef = T2006._IDRRef) AND (T2006._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference229 T2007
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\345::bytea AND T1._Fld22706_RRRef = T2007._IDRRef
LEFT OUTER JOIN _Reference45310 T2008
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\376::bytea AND T1._Fld22706_RRRef = T2008._IDRRef) AND (T2008._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference55 T2009
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0007::bytea AND T1._Fld22706_RRRef = T2009._IDRRef
LEFT OUTER JOIN (SELECT
T2011._Marked AS Marked_,
T2011._IDRRef AS IDRRef,
T2011._Fld16650RRef AS Fld16650RRef,
T2011._Fld1194 AS Fld1194_
FROM _Document528 T2011
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2012
INNER JOIN _Reference79 T2013
ON (T2012._Fld2999 = Документ.РасходыПредпринимателя::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2014
WHERE ((T2014._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2014._Fld26433_TYPE = \\010::bytea AND T2014._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2014._Fld26433_RRRef = T2012._IDRRef) AND (T2014._Fld26434RRef = T2013._IDRRef))) AND T2013._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2013._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2017
WHERE ((T2017._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2017._Fld22973RRef = T2013._IDRRef) AND (T2017._Fld22974_TYPE = \\010::bytea AND T2017._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2017._Fld22974_RRRef = T2011._Fld16650RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2018
WHERE ((T2018._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2018._Fld22980RRef = T2013._IDRRef) AND T2018._Fld22981_TYPE = \\010::bytea AND T2018._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2018._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2011._Fld1194 = CAST(0 AS NUMERIC))) T2010
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\020::bytea AND T1._Fld22706_RRRef = T2010.IDRRef
LEFT OUTER JOIN _Reference30905 T2019
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\271::bytea AND T1._Fld22706_RRRef = T2019._IDRRef) AND (T2019._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2021._Marked AS Marked_,
T2021._IDRRef AS IDRRef,
T2021._Fld15551RRef AS Fld15551RRef,
T2021._Fld1194 AS Fld1194_
FROM _Document515 T2021
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2022
INNER JOIN _Reference79 T2023
ON (T2022._Fld2999 = Документ.ПоступлениеИзПереработки::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2024
WHERE ((T2024._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2024._Fld26433_TYPE = \\010::bytea AND T2024._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2024._Fld26433_RRRef = T2022._IDRRef) AND (T2024._Fld26434RRef = T2023._IDRRef))) AND T2023._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2023._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2027
WHERE ((T2027._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2027._Fld22973RRef = T2023._IDRRef) AND (T2027._Fld22974_TYPE = \\010::bytea AND T2027._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2027._Fld22974_RRRef = T2021._Fld15551RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2028
WHERE ((T2028._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2028._Fld22980RRef = T2023._IDRRef) AND T2028._Fld22981_TYPE = \\010::bytea AND T2028._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2028._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2021._Fld1194 = CAST(0 AS NUMERIC))) T2020
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\003::bytea AND T1._Fld22706_RRRef = T2020.IDRRef
LEFT OUTER JOIN _Reference45487 T2029
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\257::bytea AND T1._Fld22706_RRRef = T2029._IDRRef) AND (T2029._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2031._Marked AS Marked_,
T2031._IDRRef AS IDRRef,
T2031._Fld12958RRef AS Fld12958RRef,
T2031._Fld1194 AS Fld1194_
FROM _Document452 T2031
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2032
INNER JOIN _Reference79 T2033
ON (T2032._Fld2999 = Документ.НачислениеЗарплаты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2034
WHERE ((T2034._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2034._Fld26433_TYPE = \\010::bytea AND T2034._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2034._Fld26433_RRRef = T2032._IDRRef) AND (T2034._Fld26434RRef = T2033._IDRRef))) AND T2033._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2033._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document452_VT13045 T2037
WHERE ((T2037._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2031._IDRRef = T2037._Document452_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2038
WHERE ((T2038._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2038._Fld22973RRef = T2033._IDRRef) AND (T2038._Fld22974_TYPE = \\010::bytea AND T2038._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2038._Fld22974_RRRef = T2031._Fld12958RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2039
WHERE ((T2039._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2039._Fld22980RRef = T2033._IDRRef) AND T2039._Fld22981_TYPE = \\010::bytea AND T2039._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2039._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2031._Fld1194 = CAST(0 AS NUMERIC))) T2030
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\304::bytea AND T1._Fld22706_RRRef = T2030.IDRRef
LEFT OUTER JOIN _Reference45397 T2040
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261U::bytea AND T1._Fld22706_RRRef = T2040._IDRRef) AND (T2040._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document30913 T2041
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\301::bytea AND T1._Fld22706_RRRef = T2041._IDRRef) AND (T2041._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document39369 T2042
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\231\\311::bytea AND T1._Fld22706_RRRef = T2042._IDRRef) AND (T2042._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference117 T2043
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000u::bytea AND T1._Fld22706_RRRef = T2043._IDRRef) AND (T2043._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45495 T2044
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\267::bytea AND T1._Fld22706_RRRef = T2044._IDRRef) AND (T2044._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference140 T2045
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\214::bytea AND T1._Fld22706_RRRef = T2045._IDRRef) AND (T2045._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2047._Marked AS Marked_,
T2047._IDRRef AS IDRRef,
T2047._Fld2846RRef AS Fld2846RRef,
T2047._Fld1194 AS Fld1194_
FROM _Reference100 T2047
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document419 T2048
ON (T2047._Fld2846RRef = T2048._IDRRef) AND (T2048._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2049
INNER JOIN _Reference79 T2050
ON (T2049._Fld2999 = Справочник.ЗаявкаНаОткрытиеЛицевыхСчетовСотрудниковПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2051
WHERE ((T2051._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2051._Fld26433_TYPE = \\010::bytea AND T2051._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2051._Fld26433_RRRef = T2049._IDRRef) AND (T2051._Fld26434RRef = T2050._IDRRef))) AND T2050._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2050._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document419_VT11551 T2054
WHERE ((T2054._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2047._Fld2846RRef = T2054._Document419_IDRRef) AND (NOT (((1=1))))))))) AND ((T2048._Fld11544RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2055
WHERE ((T2055._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2055._Fld22973RRef = T2050._IDRRef) AND (T2055._Fld22974_TYPE = \\010::bytea AND T2055._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2055._Fld22974_RRRef = T2048._Fld11544RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2056
WHERE ((T2056._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2056._Fld22980RRef = T2050._IDRRef) AND T2056._Fld22981_TYPE = CASE WHEN T2048._Fld11544RRef IS NOT NULL THEN \\010::bytea END AND T2056._Fld22981_RTRef = CASE WHEN T2048._Fld11544RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2056._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2047._Fld1194 = CAST(0 AS NUMERIC))) T2046
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000d::bytea AND T1._Fld22706_RRRef = T2046.IDRRef
LEFT OUTER JOIN _Reference45425 T2057
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261q::bytea AND T1._Fld22706_RRRef = T2057._IDRRef) AND (T2057._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2059._Marked AS Marked_,
T2059._IDRRef AS IDRRef,
T2059._Fld1194 AS Fld1194_,
T2059._Fld10682RRef AS Fld10682RRef
FROM _Document396 T2059
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2060
INNER JOIN _Reference79 T2061
ON (T2060._Fld2999 = Документ.ВосстановлениеНДС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2062
WHERE ((T2062._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2062._Fld26433_TYPE = \\010::bytea AND T2062._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2062._Fld26433_RRRef = T2060._IDRRef) AND (T2062._Fld26434RRef = T2061._IDRRef))) AND T2061._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2061._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2065
WHERE ((T2065._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2065._Fld22973RRef = T2061._IDRRef) AND (T2065._Fld22974_TYPE = \\010::bytea AND T2065._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2065._Fld22974_RRRef = T2059._Fld10682RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2066
WHERE ((T2066._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2066._Fld22980RRef = T2061._IDRRef) AND T2066._Fld22981_TYPE = \\010::bytea AND T2066._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2066._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2059._Fld1194 = CAST(0 AS NUMERIC))) T2058
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\214::bytea AND T1._Fld22706_RRRef = T2058.IDRRef
LEFT OUTER JOIN (SELECT
T2068._Marked AS Marked_,
T2068._IDRRef AS IDRRef,
T2068._Fld39274RRef AS Fld39274RRef,
T2068._Fld1194 AS Fld1194_
FROM _Reference38858 T2068
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document38862 T2069
ON (T2068._Fld39274RRef = T2069._IDRRef) AND (T2069._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2070
INNER JOIN _Reference79 T2071
ON (T2070._Fld2999 = Справочник.РегистрацияТрудовойДеятельностиПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2072
WHERE ((T2072._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2072._Fld26433_TYPE = \\010::bytea AND T2072._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2072._Fld26433_RRRef = T2070._IDRRef) AND (T2072._Fld26434RRef = T2071._IDRRef))) AND T2071._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2071._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document38862_VT38909 T2075
WHERE ((T2075._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2068._Fld39274RRef = T2075._Document38862_IDRRef) AND (NOT (((1=1))))))))) AND ((T2069._Fld38905RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2076
WHERE ((T2076._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2076._Fld22973RRef = T2071._IDRRef) AND (T2076._Fld22974_TYPE = \\010::bytea AND T2076._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2076._Fld22974_RRRef = T2069._Fld38905RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2077
WHERE ((T2077._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2077._Fld22980RRef = T2071._IDRRef) AND T2077._Fld22981_TYPE = CASE WHEN T2069._Fld38905RRef IS NOT NULL THEN \\010::bytea END AND T2077._Fld22981_RTRef = CASE WHEN T2069._Fld38905RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2077._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2068._Fld1194 = CAST(0 AS NUMERIC))) T2067
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\312::bytea AND T1._Fld22706_RRRef = T2067.IDRRef
LEFT OUTER JOIN (SELECT
T2079._Marked AS Marked_,
T2079._IDRRef AS IDRRef,
T2079._Fld34527RRef AS Fld34527RRef,
T2079._Fld1194 AS Fld1194_
FROM _Reference34049 T2079
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document440 T2080
ON (T2079._Fld34527RRef = T2080._IDRRef) AND (T2080._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2081
INNER JOIN _Reference79 T2082
ON (T2081._Fld2999 = Справочник.ИсходящаяСправкаОЗаработкеДляРасчетаПособийПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2083
WHERE ((T2083._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2083._Fld26433_TYPE = \\010::bytea AND T2083._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2083._Fld26433_RRRef = T2081._IDRRef) AND (T2083._Fld26434RRef = T2082._IDRRef))) AND T2082._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2082._Fld1194 = CAST(0 AS NUMERIC))) AND (((T2080._Fld12297RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2086
WHERE ((T2086._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2086._Fld22973RRef = T2082._IDRRef) AND (T2086._Fld22974_TYPE = \\010::bytea AND T2086._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2086._Fld22974_RRRef = T2080._Fld12297RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2087
WHERE ((T2087._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2087._Fld22980RRef = T2082._IDRRef) AND T2087._Fld22981_TYPE = CASE WHEN T2080._Fld12297RRef IS NOT NULL THEN \\010::bytea END AND T2087._Fld22981_RTRef = CASE WHEN T2080._Fld12297RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2087._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T2080._Fld12299RRef IS NOT NULL))))))) AND (T2079._Fld1194 = CAST(0 AS NUMERIC))) T2078
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\001::bytea AND T1._Fld22706_RRRef = T2078.IDRRef
LEFT OUTER JOIN _Reference40366 T2088
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\235\\256::bytea AND T1._Fld22706_RRRef = T2088._IDRRef) AND (T2088._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference217 T2089
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\331::bytea AND T1._Fld22706_RRRef = T2089._IDRRef) AND (T2089._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference152 T2090
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\230::bytea AND T1._Fld22706_RRRef = T2090._IDRRef
LEFT OUTER JOIN (SELECT
T2092._Marked AS Marked_,
T2092._IDRRef AS IDRRef,
T2092._Fld18749RRef AS Fld18749RRef,
T2092._Fld1194 AS Fld1194_
FROM _Document571 T2092
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2093
INNER JOIN _Reference79 T2094
ON (T2093._Fld2999 = Документ.УведомлениеОВвозеМаркированныхТоваровИзЕАЭСГИСМ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2095
WHERE ((T2095._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2095._Fld26433_TYPE = \\010::bytea AND T2095._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2095._Fld26433_RRRef = T2093._IDRRef) AND (T2095._Fld26434RRef = T2094._IDRRef))) AND T2094._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2094._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2098
WHERE ((T2098._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2098._Fld22973RRef = T2094._IDRRef) AND (T2098._Fld22974_TYPE = \\010::bytea AND T2098._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2098._Fld22974_RRRef = T2092._Fld18749RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2099
WHERE ((T2099._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2099._Fld22980RRef = T2094._IDRRef) AND T2099._Fld22981_TYPE = \\010::bytea AND T2099._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2099._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2092._Fld1194 = CAST(0 AS NUMERIC))) T2091
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002;::bytea AND T1._Fld22706_RRRef = T2091.IDRRef
LEFT OUTER JOIN _Document45543 T2100
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\347::bytea AND T1._Fld22706_RRRef = T2100._IDRRef) AND (T2100._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2102._Marked AS Marked_,
T2102._IDRRef AS IDRRef,
T2102._Fld18872RRef AS Fld18872RRef,
T2102._Fld18869RRef AS Fld18869RRef,
T2102._Fld1194 AS Fld1194_
FROM _Document578 T2102
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2103
INNER JOIN _Reference79 T2104
ON (T2103._Fld2999 = Документ.Увольнение::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2105
WHERE ((T2105._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2105._Fld26433_TYPE = \\010::bytea AND T2105._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2105._Fld26433_RRRef = T2103._IDRRef) AND (T2105._Fld26434RRef = T2104._IDRRef))) AND T2104._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2104._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2108
WHERE ((T2108._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2108._Fld22973RRef = T2104._IDRRef) AND (T2108._Fld22974_TYPE = \\010::bytea AND T2108._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2108._Fld22974_RRRef = T2102._Fld18869RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2109
WHERE ((T2109._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2109._Fld22980RRef = T2104._IDRRef) AND T2109._Fld22981_TYPE = \\010::bytea AND T2109._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2109._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2102._Fld1194 = CAST(0 AS NUMERIC))) T2101
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002B::bytea AND T1._Fld22706_RRRef = T2101.IDRRef
LEFT OUTER JOIN (SELECT
T2111._Marked AS Marked_,
T2111._IDRRef AS IDRRef,
T2111._Fld15367RRef AS Fld15367RRef,
T2111._Fld1194 AS Fld1194_
FROM _Document509 T2111
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2112
INNER JOIN _Reference79 T2113
ON (T2112._Fld2999 = Документ.ПодтверждениеНулевойСтавкиНДС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2114
WHERE ((T2114._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2114._Fld26433_TYPE = \\010::bytea AND T2114._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2114._Fld26433_RRRef = T2112._IDRRef) AND (T2114._Fld26434RRef = T2113._IDRRef))) AND T2113._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2113._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2117
WHERE ((T2117._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2117._Fld22973RRef = T2113._IDRRef) AND (T2117._Fld22974_TYPE = \\010::bytea AND T2117._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2117._Fld22974_RRRef = T2111._Fld15367RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2118
WHERE ((T2118._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2118._Fld22980RRef = T2113._IDRRef) AND T2118._Fld22981_TYPE = \\010::bytea AND T2118._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2118._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2111._Fld1194 = CAST(0 AS NUMERIC))) T2110
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\375::bytea AND T1._Fld22706_RRRef = T2110.IDRRef
LEFT OUTER JOIN (SELECT
T2120._OwnerIDRRef AS OwnerIDRRef,
T2120._Marked AS Marked_,
T2120._IDRRef AS IDRRef,
T2120._Fld1194 AS Fld1194_
FROM _Reference188 T2120
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2121
INNER JOIN _Reference79 T2122
ON (T2121._Fld2999 = Справочник.Патенты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2123
WHERE ((T2123._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2123._Fld26433_TYPE = \\010::bytea AND T2123._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2123._Fld26433_RRRef = T2121._IDRRef) AND (T2123._Fld26434RRef = T2122._IDRRef))) AND T2122._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2122._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2126
WHERE ((T2126._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2126._Fld22973RRef = T2122._IDRRef) AND (T2126._Fld22974_TYPE = \\010::bytea AND T2126._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2126._Fld22974_RRRef = T2120._OwnerIDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2127
WHERE ((T2127._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2127._Fld22980RRef = T2122._IDRRef) AND T2127._Fld22981_TYPE = \\010::bytea AND T2127._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2127._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2120._Fld1194 = CAST(0 AS NUMERIC))) T2119
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\274::bytea AND T1._Fld22706_RRRef = T2119.IDRRef
LEFT OUTER JOIN _Reference226 T2128
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\342::bytea AND T1._Fld22706_RRRef = T2128._IDRRef) AND (T2128._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2130._Marked AS Marked_,
T2130._IDRRef AS IDRRef,
T2130._Fld1194 AS Fld1194_,
T2130._Fld10887RRef AS Fld10887RRef
FROM _Document402 T2130
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2131
INNER JOIN _Reference79 T2132
ON (T2131._Fld2999 = Документ.ВыработкаНМА::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2133
WHERE ((T2133._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2133._Fld26433_TYPE = \\010::bytea AND T2133._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2133._Fld26433_RRRef = T2131._IDRRef) AND (T2133._Fld26434RRef = T2132._IDRRef))) AND T2132._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2132._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2136
WHERE ((T2136._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2136._Fld22973RRef = T2132._IDRRef) AND (T2136._Fld22974_TYPE = \\010::bytea AND T2136._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2136._Fld22974_RRRef = T2130._Fld10887RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2137
WHERE ((T2137._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2137._Fld22980RRef = T2132._IDRRef) AND T2137._Fld22981_TYPE = \\010::bytea AND T2137._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2137._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2130._Fld1194 = CAST(0 AS NUMERIC))) T2129
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\222::bytea AND T1._Fld22706_RRRef = T2129.IDRRef
LEFT OUTER JOIN (SELECT
T2139._Marked AS Marked_,
T2139._IDRRef AS IDRRef,
T2139._Fld1194 AS Fld1194_,
T2139._Fld11281RRef AS Fld11281RRef
FROM _Document412 T2139
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2140
INNER JOIN _Reference79 T2141
ON (T2140._Fld2999 = Документ.ЗаписьКнигиУчетаДоходовИРасходовИП::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2142
WHERE ((T2142._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2142._Fld26433_TYPE = \\010::bytea AND T2142._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2142._Fld26433_RRRef = T2140._IDRRef) AND (T2142._Fld26434RRef = T2141._IDRRef))) AND T2141._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2141._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2145
WHERE ((T2145._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2145._Fld22973RRef = T2141._IDRRef) AND (T2145._Fld22974_TYPE = \\010::bytea AND T2145._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2145._Fld22974_RRRef = T2139._Fld11281RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2146
WHERE ((T2146._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2146._Fld22980RRef = T2141._IDRRef) AND T2146._Fld22981_TYPE = \\010::bytea AND T2146._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2146._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2139._Fld1194 = CAST(0 AS NUMERIC))) T2138
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\234::bytea AND T1._Fld22706_RRRef = T2138.IDRRef
LEFT OUTER JOIN (SELECT
T2148._Marked AS Marked_,
T2148._IDRRef AS IDRRef,
T2148._Fld1194 AS Fld1194_,
T2148._Fld11828RRef AS Fld11828RRef
FROM _Document424 T2148
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2149
INNER JOIN _Reference79 T2150
ON (T2149._Fld2999 = Документ.ЗаявлениеОВвозеТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2151
WHERE ((T2151._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2151._Fld26433_TYPE = \\010::bytea AND T2151._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2151._Fld26433_RRRef = T2149._IDRRef) AND (T2151._Fld26434RRef = T2150._IDRRef))) AND T2150._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2150._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2154
WHERE ((T2154._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2154._Fld22973RRef = T2150._IDRRef) AND (T2154._Fld22974_TYPE = \\010::bytea AND T2154._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2154._Fld22974_RRRef = T2148._Fld11828RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2155
WHERE ((T2155._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2155._Fld22980RRef = T2150._IDRRef) AND T2155._Fld22981_TYPE = \\010::bytea AND T2155._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2155._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2148._Fld1194 = CAST(0 AS NUMERIC))) T2147
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\250::bytea AND T1._Fld22706_RRRef = T2147.IDRRef
LEFT OUTER JOIN _Reference40940 T2156
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\354::bytea AND T1._Fld22706_RRRef = T2156._IDRRef) AND (T2156._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2158._Marked AS Marked_,
T2158._IDRRef AS IDRRef,
T2158._Fld9313RRef AS Fld9313RRef,
T2158._Fld9307RRef AS Fld9307RRef,
T2158._Fld1194 AS Fld1194_
FROM _Document377 T2158
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2159
INNER JOIN _Reference79 T2160
ON (T2159._Fld2999 = Документ.АвизоРасчетыВходящее::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T2161
WHERE ((T2161._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2161._Fld26433_TYPE = \\010::bytea AND T2161._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2161._Fld26433_RRRef = T2159._IDRRef) AND (T2161._Fld26434RRef = T2160._IDRRef))) AND T2160._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2160._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2164
WHERE ((T2164._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2164._Fld22973RRef = T2160._IDRRef) AND (T2164._Fld22974_TYPE = \\010::bytea AND T2164._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2164._Fld22974_RRRef = T2158._Fld9307RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2165
WHERE ((T2165._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2165._Fld22980RRef = T2160._IDRRef) AND T2165._Fld22981_TYPE = \\010::bytea AND T2165._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2165._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T2166
WHERE ((T2166._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2166._Fld22973RRef = T2160._IDRRef) AND (T2166._Fld22974_TYPE = \\010::bytea AND T2166._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2166._Fld22974_RRRef = T2158._Fld9313RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T2167
WHERE ((T2167._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2167._Fld22980RRef = T2160._IDRRef) AND T2167._Fld22981_TYPE = \\010::bytea AND T2167._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2167._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2158._Fld1194 = CAST(0 AS NUMERIC))) T2157
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001y::bytea AND T1._Fld22706_RRRef = T2157.IDRRef
LEFT OUTER JOIN (SELECT
T2169._Marked AS Marked_,
T2169._IDRRef AS IDRRef,
T2169._Fld16869RRef AS Fld16869RRef,
T2169._Fld1194 AS Fld1194_
FROM _Document532 T2169
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2170
INNER JOIN _Reference79 T2171
ON (T2170._Fld2999 = Документ.РегистрацияОплатыОсновныхСредствДляИП::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2172
WHERE ((T2172._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2172._Fld26433_TYPE = \\010::bytea AND T2172._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2172._Fld26433_RRRef = T2170._IDRRef) AND (T2172._Fld26434RRef = T2171._IDRRef))) AND T2171._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2171._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2175
WHERE ((T2175._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2175._Fld22973RRef = T2171._IDRRef) AND (T2175._Fld22974_TYPE = \\010::bytea AND T2175._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2175._Fld22974_RRRef = T2169._Fld16869RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2176
WHERE ((T2176._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2176._Fld22980RRef = T2171._IDRRef) AND T2176._Fld22981_TYPE = \\010::bytea AND T2176._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2176._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2169._Fld1194 = CAST(0 AS NUMERIC))) T2168
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\024::bytea AND T1._Fld22706_RRRef = T2168.IDRRef
LEFT OUTER JOIN (SELECT
T2178._Marked AS Marked_,
T2178._IDRRef AS IDRRef,
T2178._Fld16244RRef AS Fld16244RRef,
T2178._Fld16243RRef AS Fld16243RRef,
T2178._Fld1194 AS Fld1194_
FROM _Document520 T2178
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2179
INNER JOIN _Reference79 T2180
ON (T2179._Fld2999 = Документ.ПрекращениеСтандартныхВычетовНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2181
WHERE ((T2181._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2181._Fld26433_TYPE = \\010::bytea AND T2181._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2181._Fld26433_RRRef = T2179._IDRRef) AND (T2181._Fld26434RRef = T2180._IDRRef))) AND T2180._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2180._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2184
WHERE ((T2184._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2184._Fld22973RRef = T2180._IDRRef) AND (T2184._Fld22974_TYPE = \\010::bytea AND T2184._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2184._Fld22974_RRRef = T2178._Fld16243RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2185
WHERE ((T2185._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2185._Fld22980RRef = T2180._IDRRef) AND T2185._Fld22981_TYPE = \\010::bytea AND T2185._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2185._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2178._Fld1194 = CAST(0 AS NUMERIC))) T2177
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\010::bytea AND T1._Fld22706_RRRef = T2177.IDRRef
LEFT OUTER JOIN _Reference53 T2186
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0005::bytea AND T1._Fld22706_RRRef = T2186._IDRRef) AND (T2186._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference126 T2187
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000~::bytea AND T1._Fld22706_RRRef = T2187._IDRRef) AND (T2187._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2189._Marked AS Marked_,
T2189._IDRRef AS IDRRef,
T2189._Fld2781RRef AS Fld2781RRef,
T2189._Fld1194 AS Fld1194_
FROM _Reference98 T2189
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2190
INNER JOIN _Reference79 T2191
ON (T2190._Fld2999 = Справочник.ЗарплатныеПроекты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2192
WHERE ((T2192._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2192._Fld26433_TYPE = \\010::bytea AND T2192._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2192._Fld26433_RRRef = T2190._IDRRef) AND (T2192._Fld26434RRef = T2191._IDRRef))) AND T2191._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2191._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2195
WHERE ((T2195._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2195._Fld22973RRef = T2191._IDRRef) AND (T2195._Fld22974_TYPE = \\010::bytea AND T2195._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2195._Fld22974_RRRef = T2189._Fld2781RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2196
WHERE ((T2196._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2196._Fld22980RRef = T2191._IDRRef) AND T2196._Fld22981_TYPE = \\010::bytea AND T2196._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2196._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2189._Fld1194 = CAST(0 AS NUMERIC))) T2188
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000b::bytea AND T1._Fld22706_RRRef = T2188.IDRRef
LEFT OUTER JOIN (SELECT
T2198._Marked AS Marked_,
T2198._IDRRef AS IDRRef,
T2198._Fld13406RRef AS Fld13406RRef,
T2198._Fld1194 AS Fld1194_
FROM _Document462 T2198
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2199
INNER JOIN _Reference79 T2200
ON (T2199._Fld2999 = Документ.ОписьПачекСЗВ_6::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2201
WHERE ((T2201._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2201._Fld26433_TYPE = \\010::bytea AND T2201._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2201._Fld26433_RRRef = T2199._IDRRef) AND (T2201._Fld26434RRef = T2200._IDRRef))) AND T2200._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2200._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2204
WHERE ((T2204._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2204._Fld22973RRef = T2200._IDRRef) AND (T2204._Fld22974_TYPE = \\010::bytea AND T2204._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2204._Fld22974_RRRef = T2198._Fld13406RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2205
WHERE ((T2205._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2205._Fld22980RRef = T2200._IDRRef) AND T2205._Fld22981_TYPE = \\010::bytea AND T2205._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2205._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2198._Fld1194 = CAST(0 AS NUMERIC))) T2197
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\316::bytea AND T1._Fld22706_RRRef = T2197.IDRRef
LEFT OUTER JOIN (SELECT
T2207._Marked AS Marked_,
T2207._IDRRef AS IDRRef,
T2207._Fld17254RRef AS Fld17254RRef,
T2207._Fld1194 AS Fld1194_
FROM _Document543 T2207
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2208
INNER JOIN _Reference79 T2209
ON (T2208._Fld2999 = Документ.РозничнаяПродажа::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2210
WHERE ((T2210._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2210._Fld26433_TYPE = \\010::bytea AND T2210._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2210._Fld26433_RRRef = T2208._IDRRef) AND (T2210._Fld26434RRef = T2209._IDRRef))) AND T2209._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2209._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2213
WHERE ((T2213._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2213._Fld22973RRef = T2209._IDRRef) AND (T2213._Fld22974_TYPE = \\010::bytea AND T2213._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2213._Fld22974_RRRef = T2207._Fld17254RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2214
WHERE ((T2214._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2214._Fld22980RRef = T2209._IDRRef) AND T2214._Fld22981_TYPE = \\010::bytea AND T2214._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2214._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2207._Fld1194 = CAST(0 AS NUMERIC))) T2206
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\037::bytea AND T1._Fld22706_RRRef = T2206.IDRRef
LEFT OUTER JOIN _Reference45430 T2215
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261v::bytea AND T1._Fld22706_RRRef = T2215._IDRRef) AND (T2215._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45357 T2216
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261-::bytea AND T1._Fld22706_RRRef = T2216._IDRRef) AND (T2216._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference103 T2217
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000g::bytea AND T1._Fld22706_RRRef = T2217._IDRRef
LEFT OUTER JOIN (SELECT
T2219._Marked AS Marked_,
T2219._IDRRef AS IDRRef,
T2219._Fld12132RRef AS Fld12132RRef,
T2219._Fld1194 AS Fld1194_
FROM _Document430 T2219
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2220
INNER JOIN _Reference79 T2221
ON (T2220._Fld2999 = Документ.ИзменениеСостоянияОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2222
WHERE ((T2222._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2222._Fld26433_TYPE = \\010::bytea AND T2222._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2222._Fld26433_RRRef = T2220._IDRRef) AND (T2222._Fld26434RRef = T2221._IDRRef))) AND T2221._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2221._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2225
WHERE ((T2225._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2225._Fld22973RRef = T2221._IDRRef) AND (T2225._Fld22974_TYPE = \\010::bytea AND T2225._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2225._Fld22974_RRRef = T2219._Fld12132RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2226
WHERE ((T2226._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2226._Fld22980RRef = T2221._IDRRef) AND T2226._Fld22981_TYPE = \\010::bytea AND T2226._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2226._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2219._Fld1194 = CAST(0 AS NUMERIC))) T2218
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\256::bytea AND T1._Fld22706_RRRef = T2218.IDRRef
LEFT OUTER JOIN (SELECT
T2228._Marked AS Marked_,
T2228._IDRRef AS IDRRef,
T2228._Fld16982RRef AS Fld16982RRef,
T2228._Fld1194 AS Fld1194_
FROM _Document538 T2228
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2229
INNER JOIN _Reference79 T2230
ON (T2229._Fld2999 = Документ.РеестрДанныхЭЛНЗаполняемыхРаботодателем::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2231
WHERE ((T2231._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2231._Fld26433_TYPE = \\010::bytea AND T2231._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2231._Fld26433_RRRef = T2229._IDRRef) AND (T2231._Fld26434RRef = T2230._IDRRef))) AND T2230._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2230._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2234
WHERE ((T2234._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2234._Fld22973RRef = T2230._IDRRef) AND (T2234._Fld22974_TYPE = \\010::bytea AND T2234._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2234._Fld22974_RRRef = T2228._Fld16982RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2235
WHERE ((T2235._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2235._Fld22980RRef = T2230._IDRRef) AND T2235._Fld22981_TYPE = \\010::bytea AND T2235._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2235._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2228._Fld1194 = CAST(0 AS NUMERIC))) T2227
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\032::bytea AND T1._Fld22706_RRRef = T2227.IDRRef
LEFT OUTER JOIN _Reference237 T2236
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\355::bytea AND T1._Fld22706_RRRef = T2236._IDRRef) AND (T2236._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference167 T2237
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\247::bytea AND T1._Fld22706_RRRef = T2237._IDRRef
LEFT OUTER JOIN (SELECT
T2239._Marked AS Marked_,
T2239._IDRRef AS IDRRef,
T2239._Fld1194 AS Fld1194_,
T2239._Fld10368RRef AS Fld10368RRef
FROM _Document387 T2239
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2240
INNER JOIN _Reference79 T2241
ON (T2240._Fld2999 = Документ.ВедомостьНаВыплатуЗарплатыВБанк::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2242
WHERE ((T2242._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2242._Fld26433_TYPE = \\010::bytea AND T2242._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2242._Fld26433_RRRef = T2240._IDRRef) AND (T2242._Fld26434RRef = T2241._IDRRef))) AND T2241._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2241._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document387_VT10403 T2245
WHERE ((T2245._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2239._IDRRef = T2245._Document387_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2246
WHERE ((T2246._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2246._Fld22973RRef = T2241._IDRRef) AND (T2246._Fld22974_TYPE = \\010::bytea AND T2246._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2246._Fld22974_RRRef = T2239._Fld10368RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2247
WHERE ((T2247._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2247._Fld22980RRef = T2241._IDRRef) AND T2247._Fld22981_TYPE = \\010::bytea AND T2247._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2247._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2239._Fld1194 = CAST(0 AS NUMERIC))) T2238
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\203::bytea AND T1._Fld22706_RRRef = T2238.IDRRef
LEFT OUTER JOIN (SELECT
T2249._Marked AS Marked_,
T2249._IDRRef AS IDRRef,
T2249._Fld34945RRef AS Fld34945RRef,
T2249._Fld1194 AS Fld1194_
FROM _Reference34060 T2249
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document504 T2250
ON (T2249._Fld34945RRef = T2250._IDRRef) AND (T2250._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2251
INNER JOIN _Reference79 T2252
ON (T2251._Fld2999 = Справочник.ПерерасчетСтраховыхВзносовПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2253
WHERE ((T2253._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2253._Fld26433_TYPE = \\010::bytea AND T2253._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2253._Fld26433_RRRef = T2251._IDRRef) AND (T2253._Fld26434RRef = T2252._IDRRef))) AND T2252._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2252._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document504_VT15265 T2256
WHERE ((T2256._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2249._Fld34945RRef = T2256._Document504_IDRRef) AND (NOT (((1=1))))))))) AND ((T2250._Fld15204RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2257
WHERE ((T2257._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2257._Fld22973RRef = T2252._IDRRef) AND (T2257._Fld22974_TYPE = \\010::bytea AND T2257._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2257._Fld22974_RRRef = T2250._Fld15204RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2258
WHERE ((T2258._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2258._Fld22980RRef = T2252._IDRRef) AND T2258._Fld22981_TYPE = CASE WHEN T2250._Fld15204RRef IS NOT NULL THEN \\010::bytea END AND T2258._Fld22981_RTRef = CASE WHEN T2250._Fld15204RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2258._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2249._Fld1194 = CAST(0 AS NUMERIC))) T2248
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\014::bytea AND T1._Fld22706_RRRef = T2248.IDRRef
LEFT OUTER JOIN _Reference114 T2259
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000r::bytea AND T1._Fld22706_RRRef = T2259._IDRRef) AND (T2259._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference271 T2260
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\017::bytea AND T1._Fld22706_RRRef = T2260._IDRRef) AND (T2260._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference30819 T2261
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000xc::bytea AND T1._Fld22706_RRRef = T2261._IDRRef) AND (T2261._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2263._Marked AS Marked_,
T2263._IDRRef AS IDRRef,
T2263._Fld14644RRef AS Fld14644RRef,
T2263._Fld1194 AS Fld1194_
FROM _Document489 T2263
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2264
INNER JOIN _Reference79 T2265
ON (T2264._Fld2999 = Документ.ПачкаДокументовСПВ_1::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2266
WHERE ((T2266._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2266._Fld26433_TYPE = \\010::bytea AND T2266._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2266._Fld26433_RRRef = T2264._IDRRef) AND (T2266._Fld26434RRef = T2265._IDRRef))) AND T2265._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2265._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document489_VT14693 T2269
WHERE ((T2269._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2263._IDRRef = T2269._Document489_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2270
WHERE ((T2270._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2270._Fld22973RRef = T2265._IDRRef) AND (T2270._Fld22974_TYPE = \\010::bytea AND T2270._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2270._Fld22974_RRRef = T2263._Fld14644RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2271
WHERE ((T2271._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2271._Fld22980RRef = T2265._IDRRef) AND T2271._Fld22981_TYPE = \\010::bytea AND T2271._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2271._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2263._Fld1194 = CAST(0 AS NUMERIC))) T2262
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\351::bytea AND T1._Fld22706_RRRef = T2262.IDRRef
LEFT OUTER JOIN (SELECT
T2273._Marked AS Marked_,
T2273._IDRRef AS IDRRef,
T2273._Fld40962RRef AS Fld40962RRef,
T2273._Fld40952RRef AS Fld40952RRef,
T2273._Fld1194 AS Fld1194_
FROM _Document40942 T2273
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2274
INNER JOIN _Reference79 T2275
ON (T2274._Fld2999 = Документ.ИзвещениеФСС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2276
WHERE ((T2276._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2276._Fld26433_TYPE = \\010::bytea AND T2276._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2276._Fld26433_RRRef = T2274._IDRRef) AND (T2276._Fld26434RRef = T2275._IDRRef))) AND T2275._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2275._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2279
WHERE ((T2279._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2279._Fld22973RRef = T2275._IDRRef) AND (T2279._Fld22974_TYPE = \\010::bytea AND T2279._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2279._Fld22974_RRRef = T2273._Fld40952RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2280
WHERE ((T2280._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2280._Fld22980RRef = T2275._IDRRef) AND T2280._Fld22981_TYPE = \\010::bytea AND T2280._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2280._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2273._Fld1194 = CAST(0 AS NUMERIC))) T2272
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\356::bytea AND T1._Fld22706_RRRef = T2272.IDRRef
LEFT OUTER JOIN (SELECT
T2282._Marked AS Marked_,
T2282._IDRRef AS IDRRef,
T2282._Fld34078RRef AS Fld34078RRef,
T2282._Fld34076RRef AS Fld34076RRef,
T2282._Fld1194 AS Fld1194_
FROM _Document34071 T2282
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2283
INNER JOIN _Reference79 T2284
ON (T2283._Fld2999 = Документ.ОтпускБезСохраненияОплаты::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2285
WHERE ((T2285._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2285._Fld26433_TYPE = \\010::bytea AND T2285._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2285._Fld26433_RRRef = T2283._IDRRef) AND (T2285._Fld26434RRef = T2284._IDRRef))) AND T2284._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2284._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2288
WHERE ((T2288._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2288._Fld22973RRef = T2284._IDRRef) AND (T2288._Fld22974_TYPE = \\010::bytea AND T2288._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2288._Fld22974_RRRef = T2282._Fld34076RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2289
WHERE ((T2289._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2289._Fld22980RRef = T2284._IDRRef) AND T2289._Fld22981_TYPE = \\010::bytea AND T2289._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2289._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2282._Fld1194 = CAST(0 AS NUMERIC))) T2281
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\027::bytea AND T1._Fld22706_RRRef = T2281.IDRRef
LEFT OUTER JOIN _Reference128 T2290
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\200::bytea AND T1._Fld22706_RRRef = T2290._IDRRef) AND (T2290._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2292._Marked AS Marked_,
T2292._IDRRef AS IDRRef,
T2292._Fld20818RRef AS Fld20818RRef,
T2292._Fld1194 AS Fld1194_
FROM _Document627 T2292
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2293
INNER JOIN _Reference79 T2294
ON (T2293._Fld2999 = Документ.ФормированиеЗаписейРаздела7ДекларацииНДС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2295
WHERE ((T2295._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2295._Fld26433_TYPE = \\010::bytea AND T2295._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2295._Fld26433_RRRef = T2293._IDRRef) AND (T2295._Fld26434RRef = T2294._IDRRef))) AND T2294._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2294._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2298
WHERE ((T2298._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2298._Fld22973RRef = T2294._IDRRef) AND (T2298._Fld22974_TYPE = \\010::bytea AND T2298._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2298._Fld22974_RRRef = T2292._Fld20818RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2299
WHERE ((T2299._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2299._Fld22980RRef = T2294._IDRRef) AND T2299._Fld22981_TYPE = \\010::bytea AND T2299._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2299._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2292._Fld1194 = CAST(0 AS NUMERIC))) T2291
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002s::bytea AND T1._Fld22706_RRRef = T2291.IDRRef
LEFT OUTER JOIN _Reference33520 T2300
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\202\\360::bytea AND T1._Fld22706_RRRef = T2300._IDRRef
LEFT OUTER JOIN (SELECT
T2302._Marked AS Marked_,
T2302._IDRRef AS IDRRef,
T2302._Fld17446RRef AS Fld17446RRef,
T2302._Fld1194 AS Fld1194_
FROM _Document546 T2302
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2303
INNER JOIN _Reference79 T2304
ON (T2303._Fld2999 = Документ.СведенияОСтраховомСтажеЗастрахованныхЛицСЗВ_СТАЖ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2305
WHERE ((T2305._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2305._Fld26433_TYPE = \\010::bytea AND T2305._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2305._Fld26433_RRRef = T2303._IDRRef) AND (T2305._Fld26434RRef = T2304._IDRRef))) AND T2304._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2304._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document546_VT17461 T2308
WHERE ((T2308._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2302._IDRRef = T2308._Document546_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2309
WHERE ((T2309._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2309._Fld22973RRef = T2304._IDRRef) AND (T2309._Fld22974_TYPE = \\010::bytea AND T2309._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2309._Fld22974_RRRef = T2302._Fld17446RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2310
WHERE ((T2310._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2310._Fld22980RRef = T2304._IDRRef) AND T2310._Fld22981_TYPE = \\010::bytea AND T2310._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2310._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2302._Fld1194 = CAST(0 AS NUMERIC))) T2301
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002""::bytea AND T1._Fld22706_RRRef = T2301.IDRRef
LEFT OUTER JOIN (SELECT
T2312._Marked AS Marked_,
T2312._IDRRef AS IDRRef,
T2312._Fld12084RRef AS Fld12084RRef,
T2312._Fld1194 AS Fld1194_
FROM _Document427 T2312
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2313
INNER JOIN _Reference79 T2314
ON (T2313._Fld2999 = Документ.ИзменениеГрафиковАмортизацииОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2315
WHERE ((T2315._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2315._Fld26433_TYPE = \\010::bytea AND T2315._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2315._Fld26433_RRRef = T2313._IDRRef) AND (T2315._Fld26434RRef = T2314._IDRRef))) AND T2314._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2314._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2318
WHERE ((T2318._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2318._Fld22973RRef = T2314._IDRRef) AND (T2318._Fld22974_TYPE = \\010::bytea AND T2318._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2318._Fld22974_RRRef = T2312._Fld12084RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2319
WHERE ((T2319._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2319._Fld22980RRef = T2314._IDRRef) AND T2319._Fld22981_TYPE = \\010::bytea AND T2319._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2319._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2312._Fld1194 = CAST(0 AS NUMERIC))) T2311
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\253::bytea AND T1._Fld22706_RRRef = T2311.IDRRef
LEFT OUTER JOIN (SELECT
T2321._Marked AS Marked_,
T2321._IDRRef AS IDRRef,
T2321._Fld1194 AS Fld1194_
FROM _Reference91 T2321
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2322
INNER JOIN _Reference79 T2323
ON (T2322._Fld2999 = Справочник.ДополнительныеОтчетыИОбработки::mvarchar) AND EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg26432 T2324
WHERE ((T2324._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2324._Fld26433_TYPE = \\010::bytea AND T2324._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2324._Fld26433_RRRef = T2322._IDRRef) AND (T2324._Fld26434RRef = T2323._IDRRef))) AND T2323._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2323._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1))))) AND (T2321._Fld1194 = CAST(0 AS NUMERIC))) T2320
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000[::bytea AND T1._Fld22706_RRRef = T2320.IDRRef
LEFT OUTER JOIN _Reference35454 T2327
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\212~::bytea AND T1._Fld22706_RRRef = T2327._IDRRef) AND (T2327._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45508 T2328
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\304::bytea AND T1._Fld22706_RRRef = T2328._IDRRef) AND (T2328._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2330._Marked AS Marked_,
T2330._IDRRef AS IDRRef,
T2330._Fld5576RRef AS Fld5576RRef,
T2330._Fld1194 AS Fld1194_
FROM _Reference206 T2330
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document508 T2331
ON (T2330._Fld5576RRef = T2331._IDRRef) AND (T2331._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2332
INNER JOIN _Reference79 T2333
ON (T2332._Fld2999 = Справочник.ПодтверждениеЗачисленияЗарплатыПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2334
WHERE ((T2334._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2334._Fld26433_TYPE = \\010::bytea AND T2334._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2334._Fld26433_RRRef = T2332._IDRRef) AND (T2334._Fld26434RRef = T2333._IDRRef))) AND T2333._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2333._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document508_VT15358 T2337
WHERE ((T2337._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2330._Fld5576RRef = T2337._Document508_IDRRef) AND (NOT (((1=1))))))))) AND ((T2331._Fld15350RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2338
WHERE ((T2338._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2338._Fld22973RRef = T2333._IDRRef) AND (T2338._Fld22974_TYPE = \\010::bytea AND T2338._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2338._Fld22974_RRRef = T2331._Fld15350RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2339
WHERE ((T2339._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2339._Fld22980RRef = T2333._IDRRef) AND T2339._Fld22981_TYPE = CASE WHEN T2331._Fld15350RRef IS NOT NULL THEN \\010::bytea END AND T2339._Fld22981_RTRef = CASE WHEN T2331._Fld15350RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2339._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2330._Fld1194 = CAST(0 AS NUMERIC))) T2329
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\316::bytea AND T1._Fld22706_RRRef = T2329.IDRRef
LEFT OUTER JOIN (SELECT
T2341._Marked AS Marked_,
T2341._IDRRef AS IDRRef,
T2341._Fld16946RRef AS Fld16946RRef,
T2341._Fld1194 AS Fld1194_
FROM _Document536 T2341
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2342
INNER JOIN _Reference79 T2343
ON (T2342._Fld2999 = Документ.РегламентированныйОтчет::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2344
WHERE ((T2344._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2344._Fld26433_TYPE = \\010::bytea AND T2344._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2344._Fld26433_RRRef = T2342._IDRRef) AND (T2344._Fld26434RRef = T2343._IDRRef))) AND T2343._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2343._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2347
WHERE ((T2347._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2347._Fld22973RRef = T2343._IDRRef) AND (T2347._Fld22974_TYPE = \\010::bytea AND T2347._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2347._Fld22974_RRRef = T2341._Fld16946RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2348
WHERE ((T2348._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2348._Fld22980RRef = T2343._IDRRef) AND T2348._Fld22981_TYPE = \\010::bytea AND T2348._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2348._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2341._Fld1194 = CAST(0 AS NUMERIC))) T2340
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\030::bytea AND T1._Fld22706_RRRef = T2340.IDRRef
LEFT OUTER JOIN _Reference45373 T2349
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261=::bytea AND T1._Fld22706_RRRef = T2349._IDRRef) AND (T2349._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2351._Marked AS Marked_,
T2351._IDRRef AS IDRRef,
T2351._Fld1800RRef AS Fld1800RRef,
T2351._Fld1194 AS Fld1194_
FROM _Reference48 T2351
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document387 T2352
ON (T2351._Fld1800RRef = T2352._IDRRef) AND (T2352._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2353
INNER JOIN _Reference79 T2354
ON (T2353._Fld2999 = Справочник.ВедомостьНаВыплатуЗарплатыВБанкПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2355
WHERE ((T2355._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2355._Fld26433_TYPE = \\010::bytea AND T2355._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2355._Fld26433_RRRef = T2353._IDRRef) AND (T2355._Fld26434RRef = T2354._IDRRef))) AND T2354._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2354._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document387_VT10403 T2358
WHERE ((T2358._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2351._Fld1800RRef = T2358._Document387_IDRRef) AND (NOT (((1=1))))))))) AND ((T2352._Fld10368RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2359
WHERE ((T2359._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2359._Fld22973RRef = T2354._IDRRef) AND (T2359._Fld22974_TYPE = \\010::bytea AND T2359._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2359._Fld22974_RRRef = T2352._Fld10368RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2360
WHERE ((T2360._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2360._Fld22980RRef = T2354._IDRRef) AND T2360._Fld22981_TYPE = CASE WHEN T2352._Fld10368RRef IS NOT NULL THEN \\010::bytea END AND T2360._Fld22981_RTRef = CASE WHEN T2352._Fld10368RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2360._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2351._Fld1194 = CAST(0 AS NUMERIC))) T2350
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0000::bytea AND T1._Fld22706_RRRef = T2350.IDRRef
LEFT OUTER JOIN _Reference41233 T2361
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\241\\021::bytea AND T1._Fld22706_RRRef = T2361._IDRRef) AND (T2361._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2363._Marked AS Marked_,
T2363._IDRRef AS IDRRef,
T2363._Fld16816RRef AS Fld16816RRef,
T2363._Fld1194 AS Fld1194_
FROM _Document531 T2363
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2364
INNER JOIN _Reference79 T2365
ON (T2364._Fld2999 = Документ.РеализацияУслугПоПереработке::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2366
WHERE ((T2366._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2366._Fld26433_TYPE = \\010::bytea AND T2366._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2366._Fld26433_RRRef = T2364._IDRRef) AND (T2366._Fld26434RRef = T2365._IDRRef))) AND T2365._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2365._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2369
WHERE ((T2369._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2369._Fld22973RRef = T2365._IDRRef) AND (T2369._Fld22974_TYPE = \\010::bytea AND T2369._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2369._Fld22974_RRRef = T2363._Fld16816RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2370
WHERE ((T2370._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2370._Fld22980RRef = T2365._IDRRef) AND T2370._Fld22981_TYPE = \\010::bytea AND T2370._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2370._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2363._Fld1194 = CAST(0 AS NUMERIC))) T2362
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\023::bytea AND T1._Fld22706_RRRef = T2362.IDRRef
LEFT OUTER JOIN _Reference45354 T2371
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261*::bytea AND T1._Fld22706_RRRef = T2371._IDRRef) AND (T2371._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference61516 T2372
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\360L::bytea AND T1._Fld22706_RRRef = T2372._IDRRef) AND (T2372._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2374._Marked AS Marked_,
T2374._IDRRef AS IDRRef,
T2374._Fld15386RRef AS Fld15386RRef,
T2374._Fld1194 AS Fld1194_
FROM _Document510 T2374
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2375
INNER JOIN _Reference79 T2376
ON (T2375._Fld2999 = Документ.ПодтверждениеОплатыНДСВБюджет::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2377
WHERE ((T2377._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2377._Fld26433_TYPE = \\010::bytea AND T2377._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2377._Fld26433_RRRef = T2375._IDRRef) AND (T2377._Fld26434RRef = T2376._IDRRef))) AND T2376._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2376._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2380
WHERE ((T2380._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2380._Fld22973RRef = T2376._IDRRef) AND (T2380._Fld22974_TYPE = \\010::bytea AND T2380._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2380._Fld22974_RRRef = T2374._Fld15386RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2381
WHERE ((T2381._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2381._Fld22980RRef = T2376._IDRRef) AND T2381._Fld22981_TYPE = \\010::bytea AND T2381._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2381._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2374._Fld1194 = CAST(0 AS NUMERIC))) T2373
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\376::bytea AND T1._Fld22706_RRRef = T2373.IDRRef
LEFT OUTER JOIN (SELECT
T2383._Marked AS Marked_,
T2383._IDRRef AS IDRRef,
T2383._Fld20717RRef AS Fld20717RRef,
T2383._Fld1194 AS Fld1194_
FROM _Document626 T2383
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2384
INNER JOIN _Reference79 T2385
ON (T2384._Fld2999 = Документ.ФормированиеЗаписейКнигиПродаж::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2386
WHERE ((T2386._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2386._Fld26433_TYPE = \\010::bytea AND T2386._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2386._Fld26433_RRRef = T2384._IDRRef) AND (T2386._Fld26434RRef = T2385._IDRRef))) AND T2385._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2385._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2389
WHERE ((T2389._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2389._Fld22973RRef = T2385._IDRRef) AND (T2389._Fld22974_TYPE = \\010::bytea AND T2389._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2389._Fld22974_RRRef = T2383._Fld20717RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2390
WHERE ((T2390._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2390._Fld22980RRef = T2385._IDRRef) AND T2390._Fld22981_TYPE = \\010::bytea AND T2390._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2390._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2383._Fld1194 = CAST(0 AS NUMERIC))) T2382
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002r::bytea AND T1._Fld22706_RRRef = T2382.IDRRef
LEFT OUTER JOIN _Reference45340 T2391
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\034::bytea AND T1._Fld22706_RRRef = T2391._IDRRef) AND (T2391._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference120 T2392
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000x::bytea AND T1._Fld22706_RRRef = T2392._IDRRef) AND (T2392._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference40 T2393
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000(::bytea AND T1._Fld22706_RRRef = T2393._IDRRef) AND (T2393._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference116 T2394
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000t::bytea AND T1._Fld22706_RRRef = T2394._IDRRef) AND (T2394._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2396._Marked AS Marked_,
T2396._IDRRef AS IDRRef,
T2396._Fld38870RRef AS Fld38870RRef,
T2396._Fld38867RRef AS Fld38867RRef,
T2396._Fld1194 AS Fld1194_
FROM _Document38860 T2396
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2397
INNER JOIN _Reference79 T2398
ON (T2397._Fld2999 = Документ.ДоговорРаботыУслуги::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2399
WHERE ((T2399._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2399._Fld26433_TYPE = \\010::bytea AND T2399._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2399._Fld26433_RRRef = T2397._IDRRef) AND (T2399._Fld26434RRef = T2398._IDRRef))) AND T2398._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2398._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2402
WHERE ((T2402._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2402._Fld22973RRef = T2398._IDRRef) AND (T2402._Fld22974_TYPE = \\010::bytea AND T2402._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2402._Fld22974_RRRef = T2396._Fld38867RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2403
WHERE ((T2403._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2403._Fld22980RRef = T2398._IDRRef) AND T2403._Fld22981_TYPE = \\010::bytea AND T2403._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2403._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2396._Fld1194 = CAST(0 AS NUMERIC))) T2395
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\314::bytea AND T1._Fld22706_RRRef = T2395.IDRRef
LEFT OUTER JOIN (SELECT
T2405._Marked AS Marked_,
T2405._IDRRef AS IDRRef,
T2405._Fld12513RRef AS Fld12513RRef,
T2405._Fld1194 AS Fld1194_
FROM _Document446 T2405
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2406
INNER JOIN _Reference79 T2407
ON (T2406._Fld2999 = Документ.КомплектацияНоменклатуры::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2408
WHERE ((T2408._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2408._Fld26433_TYPE = \\010::bytea AND T2408._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2408._Fld26433_RRRef = T2406._IDRRef) AND (T2408._Fld26434RRef = T2407._IDRRef))) AND T2407._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2407._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2411
WHERE ((T2411._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2411._Fld22973RRef = T2407._IDRRef) AND (T2411._Fld22974_TYPE = \\010::bytea AND T2411._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2411._Fld22974_RRRef = T2405._Fld12513RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2412
WHERE ((T2412._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2412._Fld22980RRef = T2407._IDRRef) AND T2412._Fld22981_TYPE = \\010::bytea AND T2412._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2412._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2405._Fld1194 = CAST(0 AS NUMERIC))) T2404
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\276::bytea AND T1._Fld22706_RRRef = T2404.IDRRef
LEFT OUTER JOIN _Document492 T2413
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\354::bytea AND T1._Fld22706_RRRef = T2413._IDRRef) AND (T2413._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document597 T2414
ON ((T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002U::bytea AND T1._Fld22706_RRRef = T2414._IDRRef) AND (T2414._Fld1194 = CAST(0 AS NUMERIC))) AND (1=0)
LEFT OUTER JOIN (SELECT
T2416._Marked AS Marked_,
T2416._IDRRef AS IDRRef,
T2416._Fld1194 AS Fld1194_,
T2416._Fld11225RRef AS Fld11225RRef
FROM _Document411 T2416
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2417
INNER JOIN _Reference79 T2418
ON (T2417._Fld2999 = Документ.ЖурналУчетаСчетовФактурДляПередачиВЭлектронномВиде::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2419
WHERE ((T2419._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2419._Fld26433_TYPE = \\010::bytea AND T2419._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2419._Fld26433_RRRef = T2417._IDRRef) AND (T2419._Fld26434RRef = T2418._IDRRef))) AND T2418._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2418._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2422
WHERE ((T2422._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2422._Fld22973RRef = T2418._IDRRef) AND (T2422._Fld22974_TYPE = \\010::bytea AND T2422._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2422._Fld22974_RRRef = T2416._Fld11225RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2423
WHERE ((T2423._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2423._Fld22980RRef = T2418._IDRRef) AND T2423._Fld22981_TYPE = \\010::bytea AND T2423._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2423._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2416._Fld1194 = CAST(0 AS NUMERIC))) T2415
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\233::bytea AND T1._Fld22706_RRRef = T2415.IDRRef
LEFT OUTER JOIN (SELECT
T2425._Marked AS Marked_,
T2425._IDRRef AS IDRRef,
T2425._Fld16696RRef AS Fld16696RRef,
T2425._Fld1194 AS Fld1194_
FROM _Document530X1 T2425
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2426
INNER JOIN _Reference79 T2427
ON (T2426._Fld2999 = Документ.РеализацияТоваровУслуг::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2428
WHERE ((T2428._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2428._Fld26433_TYPE = \\010::bytea AND T2428._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2428._Fld26433_RRRef = T2426._IDRRef) AND (T2428._Fld26434RRef = T2427._IDRRef))) AND T2427._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2427._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2431
WHERE ((T2431._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2431._Fld22973RRef = T2427._IDRRef) AND (T2431._Fld22974_TYPE = \\010::bytea AND T2431._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2431._Fld22974_RRRef = T2425._Fld16696RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2432
WHERE ((T2432._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2432._Fld22980RRef = T2427._IDRRef) AND T2432._Fld22981_TYPE = \\010::bytea AND T2432._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2432._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2425._Fld1194 = CAST(0 AS NUMERIC))) T2424
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\022::bytea AND T1._Fld22706_RRRef = T2424.IDRRef
LEFT OUTER JOIN _Reference45520 T2433
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\320::bytea AND T1._Fld22706_RRRef = T2433._IDRRef) AND (T2433._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2435._Marked AS Marked_,
T2435._IDRRef AS IDRRef,
T2435._Fld1194 AS Fld1194_,
T2435._Fld10617RRef AS Fld10617RRef
FROM _Document395 T2435
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2436
INNER JOIN _Reference79 T2437
ON (T2436._Fld2999 = Документ.ВозвратТоваровПоставщику::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2438
WHERE ((T2438._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2438._Fld26433_TYPE = \\010::bytea AND T2438._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2438._Fld26433_RRRef = T2436._IDRRef) AND (T2438._Fld26434RRef = T2437._IDRRef))) AND T2437._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2437._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2441
WHERE ((T2441._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2441._Fld22973RRef = T2437._IDRRef) AND (T2441._Fld22974_TYPE = \\010::bytea AND T2441._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2441._Fld22974_RRRef = T2435._Fld10617RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2442
WHERE ((T2442._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2442._Fld22980RRef = T2437._IDRRef) AND T2442._Fld22981_TYPE = \\010::bytea AND T2442._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2442._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2435._Fld1194 = CAST(0 AS NUMERIC))) T2434
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\213::bytea AND T1._Fld22706_RRRef = T2434.IDRRef
LEFT OUTER JOIN (SELECT
T2444._Marked AS Marked_,
T2444._IDRRef AS IDRRef,
T2444._Fld4313RRef AS Fld4313RRef,
T2444._Fld1194 AS Fld1194_
FROM _Reference166 T2444
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2445
INNER JOIN _Reference79 T2446
ON (T2445._Fld2999 = Справочник.ОснованияПраваПодписи::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2447
WHERE ((T2447._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2447._Fld26433_TYPE = \\010::bytea AND T2447._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2447._Fld26433_RRRef = T2445._IDRRef) AND (T2447._Fld26434RRef = T2446._IDRRef))) AND T2446._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2446._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2450
WHERE ((T2450._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2450._Fld22973RRef = T2446._IDRRef) AND (T2450._Fld22974_TYPE = \\010::bytea AND T2450._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2450._Fld22974_RRRef = T2444._Fld4313RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2451
WHERE ((T2451._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2451._Fld22980RRef = T2446._IDRRef) AND T2451._Fld22981_TYPE = \\010::bytea AND T2451._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2451._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2444._Fld1194 = CAST(0 AS NUMERIC))) T2443
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\246::bytea AND T1._Fld22706_RRRef = T2443.IDRRef
LEFT OUTER JOIN _Reference47 T2452
ON ((T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000/::bytea AND T1._Fld22706_RRRef = T2452._IDRRef) AND (T2452._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2452._Fld1760 = FALSE) OR (T2452._Fld1763 = FALSE) OR (T2452._Fld1749_TYPE = \\010::bytea AND T2452._Fld1749_RTRef = \\000\\000\\000\\321::bytea AND T2452._Fld1749_RRRef = \\207\\305\\3207E*\\320\\277\\021\\354*\\224\\032\\262\\311v::bytea))
LEFT OUTER JOIN _Reference42832 T2453
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\247P::bytea AND T1._Fld22706_RRRef = T2453._IDRRef) AND (T2453._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2455._Marked AS Marked_,
T2455._IDRRef AS IDRRef,
T2455._Fld40991RRef AS Fld40991RRef,
T2455._Fld1194 AS Fld1194_
FROM _Document40943 T2455
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2456
INNER JOIN _Reference79 T2457
ON (T2456._Fld2999 = Документ.ОбесценениеЗапасов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2458
WHERE ((T2458._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2458._Fld26433_TYPE = \\010::bytea AND T2458._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2458._Fld26433_RRRef = T2456._IDRRef) AND (T2458._Fld26434RRef = T2457._IDRRef))) AND T2457._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2457._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2461
WHERE ((T2461._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2461._Fld22973RRef = T2457._IDRRef) AND (T2461._Fld22974_TYPE = \\010::bytea AND T2461._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2461._Fld22974_RRRef = T2455._Fld40991RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2462
WHERE ((T2462._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2462._Fld22980RRef = T2457._IDRRef) AND T2462._Fld22981_TYPE = \\010::bytea AND T2462._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2462._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2455._Fld1194 = CAST(0 AS NUMERIC))) T2454
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\357::bytea AND T1._Fld22706_RRRef = T2454.IDRRef
LEFT OUTER JOIN _Reference81 T2463
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000Q::bytea AND T1._Fld22706_RRRef = T2463._IDRRef) AND (T2463._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45298 T2464
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\362::bytea AND T1._Fld22706_RRRef = T2464._IDRRef) AND (T2464._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference30897 T2465
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\261::bytea AND T1._Fld22706_RRRef = T2465._IDRRef) AND (T2465._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2467._Marked AS Marked_,
T2467._IDRRef AS IDRRef,
T2467._Fld12189RRef AS Fld12189RRef,
T2467._Fld1194 AS Fld1194_
FROM _Document435 T2467
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2468
INNER JOIN _Reference79 T2469
ON (T2468._Fld2999 = Документ.ИнвентаризацияНЗП::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2470
WHERE ((T2470._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2470._Fld26433_TYPE = \\010::bytea AND T2470._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2470._Fld26433_RRRef = T2468._IDRRef) AND (T2470._Fld26434RRef = T2469._IDRRef))) AND T2469._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2469._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2473
WHERE ((T2473._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2473._Fld22973RRef = T2469._IDRRef) AND (T2473._Fld22974_TYPE = \\010::bytea AND T2473._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2473._Fld22974_RRRef = T2467._Fld12189RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2474
WHERE ((T2474._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2474._Fld22980RRef = T2469._IDRRef) AND T2474._Fld22981_TYPE = \\010::bytea AND T2474._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2474._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2467._Fld1194 = CAST(0 AS NUMERIC))) T2466
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\263::bytea AND T1._Fld22706_RRRef = T2466.IDRRef
LEFT OUTER JOIN (SELECT
T2476._Marked AS Marked_,
T2476._IDRRef AS IDRRef,
T2476._Fld16923RRef AS Fld16923RRef,
T2476._Fld1194 AS Fld1194_
FROM _Document535 T2476
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2477
INNER JOIN _Reference79 T2478
ON (T2477._Fld2999 = Документ.РегистрУчета::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2479
WHERE ((T2479._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2479._Fld26433_TYPE = \\010::bytea AND T2479._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2479._Fld26433_RRRef = T2477._IDRRef) AND (T2479._Fld26434RRef = T2478._IDRRef))) AND T2478._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2478._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2482
WHERE ((T2482._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2482._Fld22973RRef = T2478._IDRRef) AND (T2482._Fld22974_TYPE = \\010::bytea AND T2482._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2482._Fld22974_RRRef = T2476._Fld16923RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2483
WHERE ((T2483._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2483._Fld22980RRef = T2478._IDRRef) AND T2483._Fld22981_TYPE = \\010::bytea AND T2483._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2483._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2476._Fld1194 = CAST(0 AS NUMERIC))) T2475
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\027::bytea AND T1._Fld22706_RRRef = T2475.IDRRef
LEFT OUTER JOIN (SELECT
T2485._Marked AS Marked_,
T2485._IDRRef AS IDRRef,
T2485._Fld1194 AS Fld1194_,
T2485._Fld10968RRef AS Fld10968RRef
FROM _Document405 T2485
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2486
INNER JOIN _Reference79 T2487
ON (T2486._Fld2999 = Документ.ДанныеОКорректировкеСведенийЗастрахованныхЛицСЗВ_КОРР::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2488
WHERE ((T2488._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2488._Fld26433_TYPE = \\010::bytea AND T2488._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2488._Fld26433_RRRef = T2486._IDRRef) AND (T2488._Fld26434RRef = T2487._IDRRef))) AND T2487._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2487._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document405_VT11037 T2491
WHERE ((T2491._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2485._IDRRef = T2491._Document405_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2492
WHERE ((T2492._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2492._Fld22973RRef = T2487._IDRRef) AND (T2492._Fld22974_TYPE = \\010::bytea AND T2492._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2492._Fld22974_RRRef = T2485._Fld10968RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2493
WHERE ((T2493._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2493._Fld22980RRef = T2487._IDRRef) AND T2493._Fld22981_TYPE = \\010::bytea AND T2493._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2493._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2485._Fld1194 = CAST(0 AS NUMERIC))) T2484
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\225::bytea AND T1._Fld22706_RRRef = T2484.IDRRef
LEFT OUTER JOIN _Reference362 T2494
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001j::bytea AND T1._Fld22706_RRRef = T2494._IDRRef) AND (T2494._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference32744 T2495
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\350::bytea AND T1._Fld22706_RRRef = T2495._IDRRef) AND (T2495._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference58 T2496
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000:::bytea AND T1._Fld22706_RRRef = T2496._IDRRef) AND (T2496._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference278 T2497
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\026::bytea AND T1._Fld22706_RRRef = T2497._IDRRef) AND (T2497._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2499._Marked AS Marked_,
T2499._IDRRef AS IDRRef,
T2499._Fld36926RRef AS Fld36926RRef,
T2499._Fld1194 AS Fld1194_
FROM _Reference36689 T2499
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2500
INNER JOIN _Reference79 T2501
ON (T2500._Fld2999 = Справочник.ТранзакцииОбменаСБанками::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2502
WHERE ((T2502._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2502._Fld26433_TYPE = \\010::bytea AND T2502._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2502._Fld26433_RRRef = T2500._IDRRef) AND (T2502._Fld26434RRef = T2501._IDRRef))) AND T2501._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2501._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2505
WHERE ((T2505._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2505._Fld22973RRef = T2501._IDRRef) AND (T2505._Fld22974_TYPE = \\010::bytea AND T2505._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2505._Fld22974_RRRef = T2499._Fld36926RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2506
WHERE ((T2506._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2506._Fld22980RRef = T2501._IDRRef) AND T2506._Fld22981_TYPE = \\010::bytea AND T2506._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2506._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2499._Fld1194 = CAST(0 AS NUMERIC))) T2498
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217Q::bytea AND T1._Fld22706_RRRef = T2498.IDRRef
LEFT OUTER JOIN _Reference279 T2507
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\027::bytea AND T1._Fld22706_RRRef = T2507._IDRRef
LEFT OUTER JOIN (SELECT
T2509._Marked AS Marked_,
T2509._IDRRef AS IDRRef,
T2509._Fld13382RRef AS Fld13382RRef,
T2509._Fld1194 AS Fld1194_
FROM _Document461 T2509
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2510
INNER JOIN _Reference79 T2511
ON (T2510._Fld2999 = Документ.ОписьОДВ_1::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2512
WHERE ((T2512._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2512._Fld26433_TYPE = \\010::bytea AND T2512._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2512._Fld26433_RRRef = T2510._IDRRef) AND (T2512._Fld26434RRef = T2511._IDRRef))) AND T2511._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2511._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2515
WHERE ((T2515._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2515._Fld22973RRef = T2511._IDRRef) AND (T2515._Fld22974_TYPE = \\010::bytea AND T2515._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2515._Fld22974_RRRef = T2509._Fld13382RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2516
WHERE ((T2516._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2516._Fld22980RRef = T2511._IDRRef) AND T2516._Fld22981_TYPE = \\010::bytea AND T2516._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2516._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2509._Fld1194 = CAST(0 AS NUMERIC))) T2508
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\315::bytea AND T1._Fld22706_RRRef = T2508.IDRRef
LEFT OUTER JOIN _Reference209 T2517
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\321::bytea AND T1._Fld22706_RRRef = T2517._IDRRef) AND (T2517._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2519._Marked AS Marked_,
T2519._IDRRef AS IDRRef,
T2519._Fld9040RRef AS Fld9040RRef,
T2519._Fld9039RRef AS Fld9039RRef,
T2519._Fld1194 AS Fld1194_
FROM _Document370 T2519
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2520
INNER JOIN _Reference79 T2521
ON (T2520._Fld2999 = Документ.АвансовыйПлатежИностранцаПоНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2522
WHERE ((T2522._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2522._Fld26433_TYPE = \\010::bytea AND T2522._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2522._Fld26433_RRRef = T2520._IDRRef) AND (T2522._Fld26434RRef = T2521._IDRRef))) AND T2521._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2521._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2525
WHERE ((T2525._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2525._Fld22973RRef = T2521._IDRRef) AND (T2525._Fld22974_TYPE = \\010::bytea AND T2525._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2525._Fld22974_RRRef = T2519._Fld9039RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2526
WHERE ((T2526._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2526._Fld22980RRef = T2521._IDRRef) AND T2526._Fld22981_TYPE = \\010::bytea AND T2526._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2526._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2519._Fld1194 = CAST(0 AS NUMERIC))) T2518
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001r::bytea AND T1._Fld22706_RRRef = T2518.IDRRef
LEFT OUTER JOIN _Reference42 T2527
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000*::bytea AND T1._Fld22706_RRRef = T2527._IDRRef) AND (T2527._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45423 T2528
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261o::bytea AND T1._Fld22706_RRRef = T2528._IDRRef) AND (T2528._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2530._Marked AS Marked_,
T2530._IDRRef AS IDRRef,
T2530._Fld16910RRef AS Fld16910RRef,
T2530._Fld1194 AS Fld1194_
FROM _Document534 T2530
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2531
INNER JOIN _Reference79 T2532
ON (T2531._Fld2999 = Документ.РегистрацияСуммыУбыткаУСН::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2533
WHERE ((T2533._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2533._Fld26433_TYPE = \\010::bytea AND T2533._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2533._Fld26433_RRRef = T2531._IDRRef) AND (T2533._Fld26434RRef = T2532._IDRRef))) AND T2532._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2532._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2536
WHERE ((T2536._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2536._Fld22973RRef = T2532._IDRRef) AND (T2536._Fld22974_TYPE = \\010::bytea AND T2536._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2536._Fld22974_RRRef = T2530._Fld16910RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2537
WHERE ((T2537._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2537._Fld22980RRef = T2532._IDRRef) AND T2537._Fld22981_TYPE = \\010::bytea AND T2537._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2537._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2530._Fld1194 = CAST(0 AS NUMERIC))) T2529
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\026::bytea AND T1._Fld22706_RRRef = T2529.IDRRef
LEFT OUTER JOIN _Reference73 T2538
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000I::bytea AND T1._Fld22706_RRRef = T2538._IDRRef) AND (T2538._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document37385 T2539
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\011::bytea AND T1._Fld22706_RRRef = T2539._IDRRef) AND (T2539._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2541._Marked AS Marked_,
T2541._IDRRef AS IDRRef,
T2541._Fld20840RRef AS Fld20840RRef,
T2541._Fld1194 AS Fld1194_
FROM _Document628 T2541
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2542
INNER JOIN _Reference79 T2543
ON (T2542._Fld2999 = Документ.ФормированиеУставногоКапитала::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2544
WHERE ((T2544._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2544._Fld26433_TYPE = \\010::bytea AND T2544._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2544._Fld26433_RRRef = T2542._IDRRef) AND (T2544._Fld26434RRef = T2543._IDRRef))) AND T2543._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2543._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2547
WHERE ((T2547._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2547._Fld22973RRef = T2543._IDRRef) AND (T2547._Fld22974_TYPE = \\010::bytea AND T2547._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2547._Fld22974_RRRef = T2541._Fld20840RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2548
WHERE ((T2548._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2548._Fld22980RRef = T2543._IDRRef) AND T2548._Fld22981_TYPE = \\010::bytea AND T2548._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2548._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2541._Fld1194 = CAST(0 AS NUMERIC))) T2540
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002t::bytea AND T1._Fld22706_RRRef = T2540.IDRRef
LEFT OUTER JOIN (SELECT
T2550._Marked AS Marked_,
T2550._IDRRef AS IDRRef,
T2550._Fld13702RRef AS Fld13702RRef,
T2550._Fld1194 AS Fld1194_
FROM _Document470 T2550
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2551
INNER JOIN _Reference79 T2552
ON (T2551._Fld2999 = Документ.ОтражениеНачисленияНДС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2553
WHERE ((T2553._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2553._Fld26433_TYPE = \\010::bytea AND T2553._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2553._Fld26433_RRRef = T2551._IDRRef) AND (T2553._Fld26434RRef = T2552._IDRRef))) AND T2552._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2552._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2556
WHERE ((T2556._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2556._Fld22973RRef = T2552._IDRRef) AND (T2556._Fld22974_TYPE = \\010::bytea AND T2556._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2556._Fld22974_RRRef = T2550._Fld13702RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2557
WHERE ((T2557._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2557._Fld22980RRef = T2552._IDRRef) AND T2557._Fld22981_TYPE = \\010::bytea AND T2557._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2557._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2550._Fld1194 = CAST(0 AS NUMERIC))) T2549
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\326::bytea AND T1._Fld22706_RRRef = T2549.IDRRef
LEFT OUTER JOIN _Reference290 T2558
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001""::bytea AND T1._Fld22706_RRRef = T2558._IDRRef) AND (T2558._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference282 T2559
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\032::bytea AND T1._Fld22706_RRRef = T2559._IDRRef) AND (T2559._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference67 T2560
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000C::bytea AND T1._Fld22706_RRRef = T2560._IDRRef
LEFT OUTER JOIN (SELECT
T2562._Marked AS Marked_,
T2562._IDRRef AS IDRRef,
T2562._Fld35135RRef AS Fld35135RRef,
T2562._Fld1194 AS Fld1194_
FROM _Reference34065 T2562
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document549 T2563
ON (T2562._Fld35135RRef = T2563._IDRRef) AND (T2563._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2564
INNER JOIN _Reference79 T2565
ON (T2564._Fld2999 = Справочник.СписаниеДепонированнойЗарплатыПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2566
WHERE ((T2566._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2566._Fld26433_TYPE = \\010::bytea AND T2566._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2566._Fld26433_RRRef = T2564._IDRRef) AND (T2566._Fld26434RRef = T2565._IDRRef))) AND T2565._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2565._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document549_VT17555 T2569
WHERE ((T2569._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2562._Fld35135RRef = T2569._Document549_IDRRef) AND (NOT (((1=1))))))))) AND ((T2563._Fld17548RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2570
WHERE ((T2570._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2570._Fld22973RRef = T2565._IDRRef) AND (T2570._Fld22974_TYPE = \\010::bytea AND T2570._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2570._Fld22974_RRRef = T2563._Fld17548RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2571
WHERE ((T2571._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2571._Fld22980RRef = T2565._IDRRef) AND T2571._Fld22981_TYPE = CASE WHEN T2563._Fld17548RRef IS NOT NULL THEN \\010::bytea END AND T2571._Fld22981_RTRef = CASE WHEN T2563._Fld17548RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2571._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2562._Fld1194 = CAST(0 AS NUMERIC))) T2561
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\021::bytea AND T1._Fld22706_RRRef = T2561.IDRRef
LEFT OUTER JOIN (SELECT
T2573._PredefinedID AS PredefinedID_,
T2573._Marked AS Marked_,
T2573._IDRRef AS IDRRef,
T2573._Fld40180RRef AS Fld40180RRef,
T2573._Fld1194 AS Fld1194_
FROM _Reference39722 T2573
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T2574
ON ((T2574._Fld4110RRef = T2573._Fld40180RRef) AND (T2574._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR (T2574._IDRRef = T2573._Fld40180RRef)) AND (T2574._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2575
INNER JOIN _Reference79 T2576
ON (T2575._Fld2999 = Справочник.СпособыДоставки::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2577
WHERE ((T2577._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2577._Fld26433_TYPE = \\010::bytea AND T2577._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2577._Fld26433_RRRef = T2575._IDRRef) AND (T2577._Fld26434RRef = T2576._IDRRef))) AND T2576._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2576._Fld1194 = CAST(0 AS NUMERIC))) AND (((T2573._PredefinedID <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea)) OR ((T2574._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2580
WHERE ((T2580._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2580._Fld22973RRef = T2576._IDRRef) AND (T2580._Fld22974_TYPE = \\010::bytea AND T2580._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2580._Fld22974_RRRef = T2574._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2581
WHERE ((T2581._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2581._Fld22980RRef = T2576._IDRRef) AND T2581._Fld22981_TYPE = CASE WHEN T2574._IDRRef IS NOT NULL THEN \\010::bytea END AND T2581._Fld22981_RTRef = CASE WHEN T2574._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2581._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2573._Fld1194 = CAST(0 AS NUMERIC))) T2572
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\233*::bytea AND T1._Fld22706_RRRef = T2572.IDRRef
LEFT OUTER JOIN _Reference36685 T2582
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217M::bytea AND T1._Fld22706_RRRef = T2582._IDRRef
LEFT OUTER JOIN _Reference45428 T2583
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261t::bytea AND T1._Fld22706_RRRef = T2583._IDRRef) AND (T2583._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference259 T2584
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\003::bytea AND T1._Fld22706_RRRef = T2584._IDRRef) AND (T2584._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2586._Marked AS Marked_,
T2586._IDRRef AS IDRRef,
T2586._Fld14242RRef AS Fld14242RRef,
T2586._Fld1194 AS Fld1194_
FROM _Document480 T2586
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2587
INNER JOIN _Reference79 T2588
ON (T2587._Fld2999 = Документ.ПартияМатериаловВЭксплуатации::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2589
WHERE ((T2589._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2589._Fld26433_TYPE = \\010::bytea AND T2589._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2589._Fld26433_RRRef = T2587._IDRRef) AND (T2589._Fld26434RRef = T2588._IDRRef))) AND T2588._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2588._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2592
WHERE ((T2592._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2592._Fld22973RRef = T2588._IDRRef) AND (T2592._Fld22974_TYPE = \\010::bytea AND T2592._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2592._Fld22974_RRRef = T2586._Fld14242RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2593
WHERE ((T2593._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2593._Fld22980RRef = T2588._IDRRef) AND T2593._Fld22981_TYPE = \\010::bytea AND T2593._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2593._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2586._Fld1194 = CAST(0 AS NUMERIC))) T2585
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\340::bytea AND T1._Fld22706_RRRef = T2585.IDRRef
LEFT OUTER JOIN _Reference169 T2594
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\251::bytea AND T1._Fld22706_RRRef = T2594._IDRRef
LEFT OUTER JOIN _Reference45272 T2595
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\330::bytea AND T1._Fld22706_RRRef = T2595._IDRRef) AND (T2595._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2597._Marked AS Marked_,
T2597._IDRRef AS IDRRef,
T2597._Fld31414RRef AS Fld31414RRef,
T2597._Fld31412RRef AS Fld31412RRef,
T2597._Fld1194 AS Fld1194_
FROM _Document30915 T2597
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference265 T2598
ON (T2597._Fld31414RRef = T2598._IDRRef) AND (T2598._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2599
INNER JOIN _Reference79 T2600
ON (T2599._Fld2999 = Документ.УведомлениеОПрекращенииОтпускаПоУходуЗаРебенком::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2601
WHERE ((T2601._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2601._Fld26433_TYPE = \\010::bytea AND T2601._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2601._Fld26433_RRRef = T2599._IDRRef) AND (T2601._Fld26434RRef = T2600._IDRRef))) AND T2600._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2600._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2604
WHERE ((T2604._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2604._Fld22973RRef = T2600._IDRRef) AND (T2604._Fld22974_TYPE = \\010::bytea AND T2604._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2604._Fld22974_RRRef = T2597._Fld31412RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2605
WHERE ((T2605._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2605._Fld22980RRef = T2600._IDRRef) AND T2605._Fld22981_TYPE = \\010::bytea AND T2605._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2605._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T2598._Fld7224RRef IS NOT NULL))))))) AND (T2597._Fld1194 = CAST(0 AS NUMERIC))) T2596
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\303::bytea AND T1._Fld22706_RRRef = T2596.IDRRef
LEFT OUTER JOIN (SELECT
T2607._Marked AS Marked_,
T2607._IDRRef AS IDRRef,
T2607._Fld14464RRef AS Fld14464RRef,
T2607._Fld1194 AS Fld1194_
FROM _Document486 T2607
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2608
INNER JOIN _Reference79 T2609
ON (T2608._Fld2999 = Документ.ПачкаДокументовСЗВ_6_3::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2610
WHERE ((T2610._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2610._Fld26433_TYPE = \\010::bytea AND T2610._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2610._Fld26433_RRRef = T2608._IDRRef) AND (T2610._Fld26434RRef = T2609._IDRRef))) AND T2609._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2609._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document486_VT14493 T2613
WHERE ((T2613._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2607._IDRRef = T2613._Document486_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2614
WHERE ((T2614._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2614._Fld22973RRef = T2609._IDRRef) AND (T2614._Fld22974_TYPE = \\010::bytea AND T2614._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2614._Fld22974_RRRef = T2607._Fld14464RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2615
WHERE ((T2615._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2615._Fld22980RRef = T2609._IDRRef) AND T2615._Fld22981_TYPE = \\010::bytea AND T2615._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2615._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2607._Fld1194 = CAST(0 AS NUMERIC))) T2606
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\346::bytea AND T1._Fld22706_RRRef = T2606.IDRRef
LEFT OUTER JOIN _Reference223 T2616
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\337::bytea AND T1._Fld22706_RRRef = T2616._IDRRef
LEFT OUTER JOIN (SELECT
T2618._Marked AS Marked_,
T2618._IDRRef AS IDRRef,
T2618._Fld17423RRef AS Fld17423RRef,
T2618._Fld1194 AS Fld1194_
FROM _Document545 T2618
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2619
INNER JOIN _Reference79 T2620
ON (T2619._Fld2999 = Документ.СведенияОЗастрахованныхЛицахСЗВ_М::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2621
WHERE ((T2621._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2621._Fld26433_TYPE = \\010::bytea AND T2621._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2621._Fld26433_RRRef = T2619._IDRRef) AND (T2621._Fld26434RRef = T2620._IDRRef))) AND T2620._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2620._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document545_VT17435 T2624
WHERE ((T2624._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2618._IDRRef = T2624._Document545_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2625
WHERE ((T2625._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2625._Fld22973RRef = T2620._IDRRef) AND (T2625._Fld22974_TYPE = \\010::bytea AND T2625._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2625._Fld22974_RRRef = T2618._Fld17423RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2626
WHERE ((T2626._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2626._Fld22980RRef = T2620._IDRRef) AND T2626._Fld22981_TYPE = \\010::bytea AND T2626._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2626._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2618._Fld1194 = CAST(0 AS NUMERIC))) T2617
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002!::bytea AND T1._Fld22706_RRRef = T2617.IDRRef
LEFT OUTER JOIN _Reference138 T2627
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\212::bytea AND T1._Fld22706_RRRef = T2627._IDRRef) AND (T2627._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference29669 T2628
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000s\\345::bytea AND T1._Fld22706_RRRef = T2628._IDRRef) AND (T2628._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2630._Marked AS Marked_,
T2630._IDRRef AS IDRRef,
T2630._Fld13756RRef AS Fld13756RRef,
T2630._Fld1194 AS Fld1194_
FROM _Document471 T2630
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2631
INNER JOIN _Reference79 T2632
ON (T2631._Fld2999 = Документ.ОтражениеНДСКВычету::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2633
WHERE ((T2633._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2633._Fld26433_TYPE = \\010::bytea AND T2633._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2633._Fld26433_RRRef = T2631._IDRRef) AND (T2633._Fld26434RRef = T2632._IDRRef))) AND T2632._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2632._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2636
WHERE ((T2636._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2636._Fld22973RRef = T2632._IDRRef) AND (T2636._Fld22974_TYPE = \\010::bytea AND T2636._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2636._Fld22974_RRRef = T2630._Fld13756RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2637
WHERE ((T2637._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2637._Fld22980RRef = T2632._IDRRef) AND T2637._Fld22981_TYPE = \\010::bytea AND T2637._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2637._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2630._Fld1194 = CAST(0 AS NUMERIC))) T2629
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\327::bytea AND T1._Fld22706_RRRef = T2629.IDRRef
LEFT OUTER JOIN (SELECT
T2639._Marked AS Marked_,
T2639._IDRRef AS IDRRef,
T2639._Fld30822RRef AS Fld30822RRef,
T2639._Fld1194 AS Fld1194_
FROM _Document30821 T2639
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2640
INNER JOIN _Reference79 T2641
ON (T2640._Fld2999 = Документ.РасходыНаОнлайнКассыУменьшающиеНалоги::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2642
WHERE ((T2642._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2642._Fld26433_TYPE = \\010::bytea AND T2642._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2642._Fld26433_RRRef = T2640._IDRRef) AND (T2642._Fld26434RRef = T2641._IDRRef))) AND T2641._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2641._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2645
WHERE ((T2645._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2645._Fld22973RRef = T2641._IDRRef) AND (T2645._Fld22974_TYPE = \\010::bytea AND T2645._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2645._Fld22974_RRRef = T2639._Fld30822RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2646
WHERE ((T2646._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2646._Fld22980RRef = T2641._IDRRef) AND T2646._Fld22981_TYPE = \\010::bytea AND T2646._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2646._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2639._Fld1194 = CAST(0 AS NUMERIC))) T2638
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000xe::bytea AND T1._Fld22706_RRRef = T2638.IDRRef
LEFT OUTER JOIN (SELECT
T2648._Marked AS Marked_,
T2648._IDRRef AS IDRRef,
T2648._Fld34261RRef AS Fld34261RRef,
T2648._Fld1194 AS Fld1194_
FROM _Reference34042 T2648
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document386 T2649
ON (T2648._Fld34261RRef = T2649._IDRRef) AND (T2649._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2650
INNER JOIN _Reference79 T2651
ON (T2650._Fld2999 = Справочник.ВедомостьНаВыплатуЗарплатыПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2652
WHERE ((T2652._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2652._Fld26433_TYPE = \\010::bytea AND T2652._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2652._Fld26433_RRRef = T2650._IDRRef) AND (T2652._Fld26434RRef = T2651._IDRRef))) AND T2651._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2651._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document386_VT10357 T2655
WHERE ((T2655._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2648._Fld34261RRef = T2655._Document386_IDRRef) AND (NOT (((1=1))))))))) AND ((T2649._Fld10347RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2656
WHERE ((T2656._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2656._Fld22973RRef = T2651._IDRRef) AND (T2656._Fld22974_TYPE = \\010::bytea AND T2656._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2656._Fld22974_RRRef = T2649._Fld10347RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2657
WHERE ((T2657._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2657._Fld22980RRef = T2651._IDRRef) AND T2657._Fld22981_TYPE = CASE WHEN T2649._Fld10347RRef IS NOT NULL THEN \\010::bytea END AND T2657._Fld22981_RTRef = CASE WHEN T2649._Fld10347RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2657._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2648._Fld1194 = CAST(0 AS NUMERIC))) T2647
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\372::bytea AND T1._Fld22706_RRRef = T2647.IDRRef
LEFT OUTER JOIN (SELECT
T2659._Marked AS Marked_,
T2659._IDRRef AS IDRRef,
T2659._Fld4110RRef AS Fld4110RRef,
T2659._Fld1194 AS Fld1194_
FROM _Reference159 T2659
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T2660
ON ((T2659._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) AND ((T2659._Fld4110RRef = T2660._Fld4110RRef) OR (T2659._Fld4110RRef = T2660._IDRRef)) OR (T2659._IDRRef = T2660._Fld4110RRef)) AND (T2660._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2661
INNER JOIN _Reference79 T2662
ON (T2661._Fld2999 = Справочник.Организации::mvarchar) AND EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg26432 T2663
WHERE ((T2663._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2663._Fld26433_TYPE = \\010::bytea AND T2663._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2663._Fld26433_RRRef = T2661._IDRRef) AND (T2663._Fld26434RRef = T2662._IDRRef))) AND T2662._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2662._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2666
WHERE ((T2666._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2666._Fld22973RRef = T2662._IDRRef) AND (T2666._Fld22974_TYPE = \\010::bytea AND T2666._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2666._Fld22974_RRRef = T2659._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2667
WHERE ((T2667._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2667._Fld22980RRef = T2662._IDRRef) AND T2667._Fld22981_TYPE = \\010::bytea AND T2667._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2667._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T2668
WHERE ((T2668._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2668._Fld22973RRef = T2662._IDRRef) AND (T2668._Fld22974_TYPE = \\010::bytea AND T2668._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2668._Fld22974_RRRef = T2659._Fld4110RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T2669
WHERE ((T2669._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2669._Fld22980RRef = T2662._IDRRef) AND T2669._Fld22981_TYPE = \\010::bytea AND T2669._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2669._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (T2659._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR ((T2660._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg22972 T2670
WHERE ((T2670._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2670._Fld22973RRef = T2662._IDRRef) AND (T2670._Fld22974_TYPE = \\010::bytea AND T2670._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2670._Fld22974_RRRef = T2660._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _InfoRg22979 T2671
WHERE ((T2671._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2671._Fld22980RRef = T2662._IDRRef) AND T2671._Fld22981_TYPE = CASE WHEN T2660._IDRRef IS NOT NULL THEN \\010::bytea END AND T2671._Fld22981_RTRef = CASE WHEN T2660._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2671._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2659._Fld1194 = CAST(0 AS NUMERIC))) T2658
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\237::bytea AND T1._Fld22706_RRRef = T2658.IDRRef
LEFT OUTER JOIN (SELECT
T2673._Marked AS Marked_,
T2673._IDRRef AS IDRRef,
T2673._Fld12202RRef AS Fld12202RRef,
T2673._Fld1194 AS Fld1194_
FROM _Document436 T2673
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2674
INNER JOIN _Reference79 T2675
ON (T2674._Fld2999 = Документ.ИнвентаризацияОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2676
WHERE ((T2676._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2676._Fld26433_TYPE = \\010::bytea AND T2676._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2676._Fld26433_RRRef = T2674._IDRRef) AND (T2676._Fld26434RRef = T2675._IDRRef))) AND T2675._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2675._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2679
WHERE ((T2679._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2679._Fld22973RRef = T2675._IDRRef) AND (T2679._Fld22974_TYPE = \\010::bytea AND T2679._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2679._Fld22974_RRRef = T2673._Fld12202RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2680
WHERE ((T2680._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2680._Fld22980RRef = T2675._IDRRef) AND T2680._Fld22981_TYPE = \\010::bytea AND T2680._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2680._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2673._Fld1194 = CAST(0 AS NUMERIC))) T2672
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\264::bytea AND T1._Fld22706_RRRef = T2672.IDRRef
LEFT OUTER JOIN _Reference45418 T2681
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261j::bytea AND T1._Fld22706_RRRef = T2681._IDRRef) AND (T2681._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2683._Marked AS Marked_,
T2683._IDRRef AS IDRRef,
T2683._Fld12255RRef AS Fld12255RRef,
T2683._Fld1194 AS Fld1194_
FROM _Document438 T2683
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2684
INNER JOIN _Reference79 T2685
ON (T2684._Fld2999 = Документ.ИнвентаризацияТоваровНаСкладе::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2686
WHERE ((T2686._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2686._Fld26433_TYPE = \\010::bytea AND T2686._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2686._Fld26433_RRRef = T2684._IDRRef) AND (T2686._Fld26434RRef = T2685._IDRRef))) AND T2685._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2685._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2689
WHERE ((T2689._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2689._Fld22973RRef = T2685._IDRRef) AND (T2689._Fld22974_TYPE = \\010::bytea AND T2689._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2689._Fld22974_RRRef = T2683._Fld12255RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2690
WHERE ((T2690._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2690._Fld22980RRef = T2685._IDRRef) AND T2690._Fld22981_TYPE = \\010::bytea AND T2690._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2690._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2683._Fld1194 = CAST(0 AS NUMERIC))) T2682
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\266::bytea AND T1._Fld22706_RRRef = T2682.IDRRef
LEFT OUTER JOIN _Document606 T2691
ON ((T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002^::bytea AND T1._Fld22706_RRRef = T2691._IDRRef) AND (T2691._Fld1194 = CAST(0 AS NUMERIC))) AND (1=0)
LEFT OUTER JOIN _Reference30895 T2692
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\257::bytea AND T1._Fld22706_RRRef = T2692._IDRRef) AND (T2692._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2694._Marked AS Marked_,
T2694._IDRRef AS IDRRef,
T2694._Fld1194 AS Fld1194_,
T2694._Fld11523RRef AS Fld11523RRef
FROM _Document418 T2694
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2695
INNER JOIN _Reference79 T2696
ON (T2695._Fld2999 = Документ.ЗаявкаНаЗакрытиеЛицевыхСчетовСотрудников::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2697
WHERE ((T2697._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2697._Fld26433_TYPE = \\010::bytea AND T2697._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2697._Fld26433_RRRef = T2695._IDRRef) AND (T2697._Fld26434RRef = T2696._IDRRef))) AND T2696._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2696._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document418_VT11530 T2700
WHERE ((T2700._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2694._IDRRef = T2700._Document418_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2701
WHERE ((T2701._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2701._Fld22973RRef = T2696._IDRRef) AND (T2701._Fld22974_TYPE = \\010::bytea AND T2701._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2701._Fld22974_RRRef = T2694._Fld11523RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2702
WHERE ((T2702._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2702._Fld22980RRef = T2696._IDRRef) AND T2702._Fld22981_TYPE = \\010::bytea AND T2702._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2702._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2694._Fld1194 = CAST(0 AS NUMERIC))) T2693
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\242::bytea AND T1._Fld22706_RRRef = T2693.IDRRef
LEFT OUTER JOIN (SELECT
T2704._Marked AS Marked_,
T2704._IDRRef AS IDRRef,
T2704._Fld40896RRef AS Fld40896RRef,
T2704._Fld1194 AS Fld1194_
FROM _Reference40882 T2704
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T2705
ON (T2704._Fld40896RRef = T2705._IDRRef) AND (T2705._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference159 T2706
ON ((T2705._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) AND ((T2705._Fld4110RRef = T2706._Fld4110RRef) OR (T2705._Fld4110RRef = T2706._IDRRef)) OR (T2704._Fld40896RRef = T2706._Fld4110RRef)) AND (T2706._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2707
INNER JOIN _Reference79 T2708
ON (T2707._Fld2999 = Справочник.ПравилаФинОтчетности::mvarchar) AND EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg26432 T2709
WHERE ((T2709._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2709._Fld26433_TYPE = \\010::bytea AND T2709._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2709._Fld26433_RRRef = T2707._IDRRef) AND (T2709._Fld26434RRef = T2708._IDRRef))) AND T2708._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2708._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT (((\\000\\000\\000\\237::bytea = \\000\\000\\000\\237::bytea)))) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2712
WHERE ((T2712._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2712._Fld22973RRef = T2708._IDRRef) AND (T2712._Fld22974_TYPE = \\010::bytea AND T2712._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2712._Fld22974_RRRef = T2704._Fld40896RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2713
WHERE ((T2713._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2713._Fld22980RRef = T2708._IDRRef) AND T2713._Fld22981_TYPE = \\010::bytea AND T2713._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2713._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((T2705._Fld4110RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T2714
WHERE ((T2714._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2714._Fld22973RRef = T2708._IDRRef) AND (T2714._Fld22974_TYPE = \\010::bytea AND T2714._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2714._Fld22974_RRRef = T2705._Fld4110RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T2715
WHERE ((T2715._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2715._Fld22980RRef = T2708._IDRRef) AND T2715._Fld22981_TYPE = CASE WHEN T2705._Fld4110RRef IS NOT NULL THEN \\010::bytea END AND T2715._Fld22981_RTRef = CASE WHEN T2705._Fld4110RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2715._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (T2705._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR ((T2706._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg22972 T2716
WHERE ((T2716._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2716._Fld22973RRef = T2708._IDRRef) AND (T2716._Fld22974_TYPE = \\010::bytea AND T2716._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2716._Fld22974_RRRef = T2706._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _InfoRg22979 T2717
WHERE ((T2717._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2717._Fld22980RRef = T2708._IDRRef) AND T2717._Fld22981_TYPE = CASE WHEN T2706._IDRRef IS NOT NULL THEN \\010::bytea END AND T2717._Fld22981_RTRef = CASE WHEN T2706._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2717._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2704._Fld1194 = CAST(0 AS NUMERIC))) T2703
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\262::bytea AND T1._Fld22706_RRRef = T2703.IDRRef
LEFT OUTER JOIN (SELECT
T2719._Marked AS Marked_,
T2719._IDRRef AS IDRRef,
T2719._Fld45047RRef AS Fld45047RRef,
T2719._Fld1194 AS Fld1194_
FROM _Document44981 T2719
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2720
INNER JOIN _Reference79 T2721
ON (T2720._Fld2999 = Документ.УсловияОплатыПоступления::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2722
WHERE ((T2722._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2722._Fld26433_TYPE = \\010::bytea AND T2722._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2722._Fld26433_RRRef = T2720._IDRRef) AND (T2722._Fld26434RRef = T2721._IDRRef))) AND T2721._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2721._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2725
WHERE ((T2725._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2725._Fld22973RRef = T2721._IDRRef) AND (T2725._Fld22974_TYPE = \\010::bytea AND T2725._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2725._Fld22974_RRRef = T2719._Fld45047RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2726
WHERE ((T2726._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2726._Fld22980RRef = T2721._IDRRef) AND T2726._Fld22981_TYPE = \\010::bytea AND T2726._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2726._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2719._Fld1194 = CAST(0 AS NUMERIC))) T2718
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\257\\265::bytea AND T1._Fld22706_RRRef = T2718.IDRRef
LEFT OUTER JOIN _Reference70 T2727
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000F::bytea AND T1._Fld22706_RRRef = T2727._IDRRef
LEFT OUTER JOIN (SELECT
T2729._Marked AS Marked_,
T2729._IDRRef AS IDRRef,
T2729._Fld12299RRef AS Fld12299RRef,
T2729._Fld12297RRef AS Fld12297RRef,
T2729._Fld1194 AS Fld1194_
FROM _Document440 T2729
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2730
INNER JOIN _Reference79 T2731
ON (T2730._Fld2999 = Документ.ИсходящаяСправкаОЗаработкеДляРасчетаПособий::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2732
WHERE ((T2732._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2732._Fld26433_TYPE = \\010::bytea AND T2732._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2732._Fld26433_RRRef = T2730._IDRRef) AND (T2732._Fld26434RRef = T2731._IDRRef))) AND T2731._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2731._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2735
WHERE ((T2735._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2735._Fld22973RRef = T2731._IDRRef) AND (T2735._Fld22974_TYPE = \\010::bytea AND T2735._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2735._Fld22974_RRRef = T2729._Fld12297RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2736
WHERE ((T2736._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2736._Fld22980RRef = T2731._IDRRef) AND T2736._Fld22981_TYPE = \\010::bytea AND T2736._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2736._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2729._Fld1194 = CAST(0 AS NUMERIC))) T2728
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\270::bytea AND T1._Fld22706_RRRef = T2728.IDRRef
LEFT OUTER JOIN (SELECT
T2738._Marked AS Marked_,
T2738._IDRRef AS IDRRef,
T2738._Fld16674RRef AS Fld16674RRef,
T2738._Fld1194 AS Fld1194_
FROM _Document529 T2738
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2739
INNER JOIN _Reference79 T2740
ON (T2739._Fld2999 = Документ.РеализацияОтгруженныхТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2741
WHERE ((T2741._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2741._Fld26433_TYPE = \\010::bytea AND T2741._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2741._Fld26433_RRRef = T2739._IDRRef) AND (T2741._Fld26434RRef = T2740._IDRRef))) AND T2740._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2740._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2744
WHERE ((T2744._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2744._Fld22973RRef = T2740._IDRRef) AND (T2744._Fld22974_TYPE = \\010::bytea AND T2744._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2744._Fld22974_RRRef = T2738._Fld16674RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2745
WHERE ((T2745._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2745._Fld22980RRef = T2740._IDRRef) AND T2745._Fld22981_TYPE = \\010::bytea AND T2745._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2745._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2738._Fld1194 = CAST(0 AS NUMERIC))) T2737
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\021::bytea AND T1._Fld22706_RRRef = T2737.IDRRef
LEFT OUTER JOIN (SELECT
T2747._Marked AS Marked_,
T2747._IDRRef AS IDRRef,
T2747._Fld1194 AS Fld1194_,
T2747._Fld11404RRef AS Fld11404RRef
FROM _Document413 T2747
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2748
INNER JOIN _Reference79 T2749
ON (T2748._Fld2999 = Документ.ЗаписьКУДиР::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2750
WHERE ((T2750._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2750._Fld26433_TYPE = \\010::bytea AND T2750._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2750._Fld26433_RRRef = T2748._IDRRef) AND (T2750._Fld26434RRef = T2749._IDRRef))) AND T2749._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2749._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2753
WHERE ((T2753._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2753._Fld22973RRef = T2749._IDRRef) AND (T2753._Fld22974_TYPE = \\010::bytea AND T2753._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2753._Fld22974_RRRef = T2747._Fld11404RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2754
WHERE ((T2754._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2754._Fld22980RRef = T2749._IDRRef) AND T2754._Fld22981_TYPE = \\010::bytea AND T2754._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2754._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2747._Fld1194 = CAST(0 AS NUMERIC))) T2746
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\235::bytea AND T1._Fld22706_RRRef = T2746.IDRRef
LEFT OUTER JOIN _Reference33516 T2755
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\202\\354::bytea AND T1._Fld22706_RRRef = T2755._IDRRef) AND (T2755._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference50 T2756
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0002::bytea AND T1._Fld22706_RRRef = T2756._IDRRef) AND (T2756._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45317 T2757
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\005::bytea AND T1._Fld22706_RRRef = T2757._IDRRef) AND (T2757._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference30900 T2758
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\264::bytea AND T1._Fld22706_RRRef = T2758._IDRRef) AND (T2758._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference38292 T2759
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\225\\224::bytea AND T1._Fld22706_RRRef = T2759._IDRRef) AND (T2759._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2761._Marked AS Marked_,
T2761._IDRRef AS IDRRef,
T2761._Fld35287RRef AS Fld35287RRef,
T2761._Fld1194 AS Fld1194_
FROM _Reference34069 T2761
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document30915 T2762
ON (T2761._Fld35287RRef = T2762._IDRRef) AND (T2762._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference265 T2763
ON (T2762._Fld31414RRef = T2763._IDRRef) AND (T2763._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2764
INNER JOIN _Reference79 T2765
ON (T2764._Fld2999 = Справочник.УведомлениеОПрекращенииОтпускаПоУходуЗаРебенкомПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2766
WHERE ((T2766._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2766._Fld26433_TYPE = \\010::bytea AND T2766._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2766._Fld26433_RRRef = T2764._IDRRef) AND (T2766._Fld26434RRef = T2765._IDRRef))) AND T2765._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2765._Fld1194 = CAST(0 AS NUMERIC))) AND (((T2762._Fld31412RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2769
WHERE ((T2769._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2769._Fld22973RRef = T2765._IDRRef) AND (T2769._Fld22974_TYPE = \\010::bytea AND T2769._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2769._Fld22974_RRRef = T2762._Fld31412RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2770
WHERE ((T2770._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2770._Fld22980RRef = T2765._IDRRef) AND T2770._Fld22981_TYPE = CASE WHEN T2762._Fld31412RRef IS NOT NULL THEN \\010::bytea END AND T2770._Fld22981_RTRef = CASE WHEN T2762._Fld31412RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2770._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T2763._Fld7224RRef IS NOT NULL))))))) AND (T2761._Fld1194 = CAST(0 AS NUMERIC))) T2760
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\025::bytea AND T1._Fld22706_RRRef = T2760.IDRRef
LEFT OUTER JOIN _Reference39715 T2771
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\233#::bytea AND T1._Fld22706_RRRef = T2771._IDRRef) AND (T2771._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2773._Marked AS Marked_,
T2773._IDRRef AS IDRRef,
T2773._Fld15318RRef AS Fld15318RRef,
T2773._Fld1194 AS Fld1194_
FROM _Document506 T2773
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2774
INNER JOIN _Reference79 T2775
ON (T2774._Fld2999 = Документ.ПлатежноеТребование::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2776
WHERE ((T2776._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2776._Fld26433_TYPE = \\010::bytea AND T2776._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2776._Fld26433_RRRef = T2774._IDRRef) AND (T2776._Fld26434RRef = T2775._IDRRef))) AND T2775._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2775._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2779
WHERE ((T2779._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2779._Fld22973RRef = T2775._IDRRef) AND (T2779._Fld22974_TYPE = \\010::bytea AND T2779._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2779._Fld22974_RRRef = T2773._Fld15318RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2780
WHERE ((T2780._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2780._Fld22980RRef = T2775._IDRRef) AND T2780._Fld22981_TYPE = \\010::bytea AND T2780._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2780._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2773._Fld1194 = CAST(0 AS NUMERIC))) T2772
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\372::bytea AND T1._Fld22706_RRRef = T2772.IDRRef
LEFT OUTER JOIN _Reference118 T2781
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000v::bytea AND T1._Fld22706_RRRef = T2781._IDRRef) AND (T2781._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2783._Marked AS Marked_,
T2783._IDRRef AS IDRRef,
T2783._Fld9139RRef AS Fld9139RRef,
T2783._Fld9134RRef AS Fld9134RRef,
T2783._Fld1194 AS Fld1194_
FROM _Document373 T2783
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2784
INNER JOIN _Reference79 T2785
ON (T2784._Fld2999 = Документ.АвизоОСВходящее::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T2786
WHERE ((T2786._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2786._Fld26433_TYPE = \\010::bytea AND T2786._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2786._Fld26433_RRRef = T2784._IDRRef) AND (T2786._Fld26434RRef = T2785._IDRRef))) AND T2785._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2785._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2789
WHERE ((T2789._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2789._Fld22973RRef = T2785._IDRRef) AND (T2789._Fld22974_TYPE = \\010::bytea AND T2789._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2789._Fld22974_RRRef = T2783._Fld9134RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2790
WHERE ((T2790._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2790._Fld22980RRef = T2785._IDRRef) AND T2790._Fld22981_TYPE = \\010::bytea AND T2790._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2790._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T2791
WHERE ((T2791._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2791._Fld22973RRef = T2785._IDRRef) AND (T2791._Fld22974_TYPE = \\010::bytea AND T2791._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2791._Fld22974_RRRef = T2783._Fld9139RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T2792
WHERE ((T2792._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2792._Fld22980RRef = T2785._IDRRef) AND T2792._Fld22981_TYPE = \\010::bytea AND T2792._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2792._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2783._Fld1194 = CAST(0 AS NUMERIC))) T2782
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001u::bytea AND T1._Fld22706_RRRef = T2782.IDRRef
LEFT OUTER JOIN _Document45552 T2793
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\360::bytea AND T1._Fld22706_RRRef = T2793._IDRRef) AND (T2793._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2795._Marked AS Marked_,
T2795._IDRRef AS IDRRef,
T2795._Fld12157RRef AS Fld12157RRef,
T2795._Fld1194 AS Fld1194_
FROM _Document432 T2795
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2796
INNER JOIN _Reference79 T2797
ON (T2796._Fld2999 = Документ.ИзменениеСпециальногоКоэффициентаОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2798
WHERE ((T2798._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2798._Fld26433_TYPE = \\010::bytea AND T2798._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2798._Fld26433_RRRef = T2796._IDRRef) AND (T2798._Fld26434RRef = T2797._IDRRef))) AND T2797._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2797._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2801
WHERE ((T2801._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2801._Fld22973RRef = T2797._IDRRef) AND (T2801._Fld22974_TYPE = \\010::bytea AND T2801._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2801._Fld22974_RRRef = T2795._Fld12157RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2802
WHERE ((T2802._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2802._Fld22980RRef = T2797._IDRRef) AND T2802._Fld22981_TYPE = \\010::bytea AND T2802._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2802._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2795._Fld1194 = CAST(0 AS NUMERIC))) T2794
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\260::bytea AND T1._Fld22706_RRRef = T2794.IDRRef
LEFT OUTER JOIN _Document45586 T2803
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262\\022::bytea AND T1._Fld22706_RRRef = T2803._IDRRef) AND (T2803._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2805._Marked AS Marked_,
T2805._IDRRef AS IDRRef,
T2805._Fld45035RRef AS Fld45035RRef,
T2805._Fld1194 AS Fld1194_
FROM _Document44980 T2805
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2806
INNER JOIN _Reference79 T2807
ON (T2806._Fld2999 = Документ.ПереводОСВМалоценноеОборудование::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2808
WHERE ((T2808._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2808._Fld26433_TYPE = \\010::bytea AND T2808._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2808._Fld26433_RRRef = T2806._IDRRef) AND (T2808._Fld26434RRef = T2807._IDRRef))) AND T2807._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2807._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2811
WHERE ((T2811._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2811._Fld22973RRef = T2807._IDRRef) AND (T2811._Fld22974_TYPE = \\010::bytea AND T2811._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2811._Fld22974_RRRef = T2805._Fld45035RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2812
WHERE ((T2812._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2812._Fld22980RRef = T2807._IDRRef) AND T2812._Fld22981_TYPE = \\010::bytea AND T2812._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2812._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2805._Fld1194 = CAST(0 AS NUMERIC))) T2804
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\257\\264::bytea AND T1._Fld22706_RRRef = T2804.IDRRef
LEFT OUTER JOIN (SELECT
T2814._Marked AS Marked_,
T2814._IDRRef AS IDRRef,
T2814._Fld16253RRef AS Fld16253RRef,
T2814._Fld16250RRef AS Fld16250RRef,
T2814._Fld1194 AS Fld1194_
FROM _Document521 T2814
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2815
INNER JOIN _Reference79 T2816
ON (T2815._Fld2999 = Документ.ПриемНаРаботу::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2817
WHERE ((T2817._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2817._Fld26433_TYPE = \\010::bytea AND T2817._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2817._Fld26433_RRRef = T2815._IDRRef) AND (T2817._Fld26434RRef = T2816._IDRRef))) AND T2816._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2816._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2820
WHERE ((T2820._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2820._Fld22973RRef = T2816._IDRRef) AND (T2820._Fld22974_TYPE = \\010::bytea AND T2820._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2820._Fld22974_RRRef = T2814._Fld16250RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2821
WHERE ((T2821._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2821._Fld22980RRef = T2816._IDRRef) AND T2821._Fld22981_TYPE = \\010::bytea AND T2821._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2821._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2814._Fld1194 = CAST(0 AS NUMERIC))) T2813
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\011::bytea AND T1._Fld22706_RRRef = T2813.IDRRef
LEFT OUTER JOIN _Reference203 T2822
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\313::bytea AND T1._Fld22706_RRRef = T2822._IDRRef) AND (T2822._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document30912 T2823
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\300::bytea AND T1._Fld22706_RRRef = T2823._IDRRef) AND (T2823._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2825._OwnerIDRRef AS OwnerIDRRef,
T2825._Marked AS Marked_,
T2825._IDRRef AS IDRRef,
T2825._Fld1194 AS Fld1194_
FROM _Reference241 T2825
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2826
INNER JOIN _Reference79 T2827
ON (T2826._Fld2999 = Справочник.РегистрацииВНалоговомОргане::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2828
WHERE ((T2828._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2828._Fld26433_TYPE = \\010::bytea AND T2828._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2828._Fld26433_RRRef = T2826._IDRRef) AND (T2828._Fld26434RRef = T2827._IDRRef))) AND T2827._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2827._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2831
WHERE ((T2831._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2831._Fld22973RRef = T2827._IDRRef) AND (T2831._Fld22974_TYPE = \\010::bytea AND T2831._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2831._Fld22974_RRRef = T2825._OwnerIDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2832
WHERE ((T2832._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2832._Fld22980RRef = T2827._IDRRef) AND T2832._Fld22981_TYPE = \\010::bytea AND T2832._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2832._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))) OR EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T2833
ON ((T2833._Fld4110RRef = T2825._OwnerIDRRef) AND (T2833._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR (T2833._IDRRef = T2825._OwnerIDRRef)) AND (T2833._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2834
INNER JOIN _Reference79 T2835
ON (T2834._Fld2999 = Справочник.РегистрацииВНалоговомОргане::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2836
WHERE ((T2836._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2836._Fld26433_TYPE = \\010::bytea AND T2836._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2836._Fld26433_RRRef = T2834._IDRRef) AND (T2836._Fld26434RRef = T2835._IDRRef))) AND T2835._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2835._Fld1194 = CAST(0 AS NUMERIC))) AND (((T2833._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2839
WHERE ((T2839._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2839._Fld22973RRef = T2835._IDRRef) AND (T2839._Fld22974_TYPE = \\010::bytea AND T2839._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2839._Fld22974_RRRef = T2833._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2840
WHERE ((T2840._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2840._Fld22980RRef = T2835._IDRRef) AND T2840._Fld22981_TYPE = CASE WHEN T2833._IDRRef IS NOT NULL THEN \\010::bytea END AND T2840._Fld22981_RTRef = CASE WHEN T2833._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2840._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2825._Fld1194 = CAST(0 AS NUMERIC))) T2824
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\361::bytea AND T1._Fld22706_RRRef = T2824.IDRRef
LEFT OUTER JOIN (SELECT
T2842._Marked AS Marked_,
T2842._IDRRef AS IDRRef,
T2842._Fld44472RRef AS Fld44472RRef,
T2842._Fld1194 AS Fld1194_
FROM _Document44387 T2842
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2843
INNER JOIN _Reference79 T2844
ON (T2843._Fld2999 = Документ.УведомлениеОПеремещенииПрослеживаемыхТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2845
WHERE ((T2845._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2845._Fld26433_TYPE = \\010::bytea AND T2845._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2845._Fld26433_RRRef = T2843._IDRRef) AND (T2845._Fld26434RRef = T2844._IDRRef))) AND T2844._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2844._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2848
WHERE ((T2848._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2848._Fld22973RRef = T2844._IDRRef) AND (T2848._Fld22974_TYPE = \\010::bytea AND T2848._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2848._Fld22974_RRRef = T2842._Fld44472RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2849
WHERE ((T2849._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2849._Fld22980RRef = T2844._IDRRef) AND T2849._Fld22981_TYPE = \\010::bytea AND T2849._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2849._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2842._Fld1194 = CAST(0 AS NUMERIC))) T2841
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255c::bytea AND T1._Fld22706_RRRef = T2841.IDRRef
LEFT OUTER JOIN _Reference44777 T2850
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\256\\351::bytea AND T1._Fld22706_RRRef = T2850._IDRRef) AND (T2850._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2852._Marked AS Marked_,
T2852._IDRRef AS IDRRef,
T2852._Fld1194 AS Fld1194_,
T2852._Fld10488RRef AS Fld10488RRef
FROM _Document391 T2852
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2853
INNER JOIN _Reference79 T2854
ON (T2853._Fld2999 = Документ.ВозвратМатериаловИзЭксплуатации::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2855
WHERE ((T2855._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2855._Fld26433_TYPE = \\010::bytea AND T2855._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2855._Fld26433_RRRef = T2853._IDRRef) AND (T2855._Fld26434RRef = T2854._IDRRef))) AND T2854._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2854._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2858
WHERE ((T2858._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2858._Fld22973RRef = T2854._IDRRef) AND (T2858._Fld22974_TYPE = \\010::bytea AND T2858._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2858._Fld22974_RRRef = T2852._Fld10488RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2859
WHERE ((T2859._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2859._Fld22980RRef = T2854._IDRRef) AND T2859._Fld22981_TYPE = \\010::bytea AND T2859._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2859._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2852._Fld1194 = CAST(0 AS NUMERIC))) T2851
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\207::bytea AND T1._Fld22706_RRRef = T2851.IDRRef
LEFT OUTER JOIN (SELECT
T2861._Marked AS Marked_,
T2861._IDRRef AS IDRRef,
T2861._Fld14375RRef AS Fld14375RRef,
T2861._Fld1194 AS Fld1194_
FROM _Document484 T2861
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2862
INNER JOIN _Reference79 T2863
ON (T2862._Fld2999 = Документ.ПачкаДокументовДСВ_1::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2864
WHERE ((T2864._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2864._Fld26433_TYPE = \\010::bytea AND T2864._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2864._Fld26433_RRRef = T2862._IDRRef) AND (T2864._Fld26434RRef = T2863._IDRRef))) AND T2863._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2863._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document484_VT14385 T2867
WHERE ((T2867._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2861._IDRRef = T2867._Document484_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2868
WHERE ((T2868._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2868._Fld22973RRef = T2863._IDRRef) AND (T2868._Fld22974_TYPE = \\010::bytea AND T2868._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2868._Fld22974_RRRef = T2861._Fld14375RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2869
WHERE ((T2869._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2869._Fld22980RRef = T2863._IDRRef) AND T2869._Fld22981_TYPE = \\010::bytea AND T2869._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2869._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2861._Fld1194 = CAST(0 AS NUMERIC))) T2860
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\344::bytea AND T1._Fld22706_RRRef = T2860.IDRRef
LEFT OUTER JOIN _Reference358 T2870
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001f::bytea AND T1._Fld22706_RRRef = T2870._IDRRef) AND (T2870._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2872._Marked AS Marked_,
T2872._IDRRef AS IDRRef,
T2872._Fld17798RRef AS Fld17798RRef,
T2872._Fld17792RRef AS Fld17792RRef,
T2872._Fld1194 AS Fld1194_
FROM _Document556 T2872
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2873
INNER JOIN _Reference79 T2874
ON (T2873._Fld2999 = Документ.СправкаНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2875
WHERE ((T2875._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2875._Fld26433_TYPE = \\010::bytea AND T2875._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2875._Fld26433_RRRef = T2873._IDRRef) AND (T2875._Fld26434RRef = T2874._IDRRef))) AND T2874._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2874._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2878
WHERE ((T2878._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2878._Fld22973RRef = T2874._IDRRef) AND (T2878._Fld22974_TYPE = \\010::bytea AND T2878._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2878._Fld22974_RRRef = T2872._Fld17792RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2879
WHERE ((T2879._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2879._Fld22980RRef = T2874._IDRRef) AND T2879._Fld22981_TYPE = \\010::bytea AND T2879._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2879._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T2872._Fld1194 = CAST(0 AS NUMERIC))) T2871
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002,::bytea AND T1._Fld22706_RRRef = T2871.IDRRef
LEFT OUTER JOIN (SELECT
T2881._Marked AS Marked_,
T2881._IDRRef AS IDRRef,
T2881._Fld13061RRef AS Fld13061RRef,
T2881._Fld1194 AS Fld1194_
FROM _Document453 T2881
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2882
INNER JOIN _Reference79 T2883
ON (T2882._Fld2999 = Документ.НачислениеНДСпоСМРхозспособом::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2884
WHERE ((T2884._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2884._Fld26433_TYPE = \\010::bytea AND T2884._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2884._Fld26433_RRRef = T2882._IDRRef) AND (T2884._Fld26434RRef = T2883._IDRRef))) AND T2883._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2883._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2887
WHERE ((T2887._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2887._Fld22973RRef = T2883._IDRRef) AND (T2887._Fld22974_TYPE = \\010::bytea AND T2887._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2887._Fld22974_RRRef = T2881._Fld13061RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2888
WHERE ((T2888._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2888._Fld22980RRef = T2883._IDRRef) AND T2888._Fld22981_TYPE = \\010::bytea AND T2888._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2888._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2881._Fld1194 = CAST(0 AS NUMERIC))) T2880
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\305::bytea AND T1._Fld22706_RRRef = T2880.IDRRef
LEFT OUTER JOIN _Reference269 T2889
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\015::bytea AND T1._Fld22706_RRRef = T2889._IDRRef) AND (T2889._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2891._Marked AS Marked_,
T2891._IDRRef AS IDRRef,
T2891._Fld34907RRef AS Fld34907RRef,
T2891._Fld1194 AS Fld1194_
FROM _Reference34059 T2891
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document503 T2892
ON (T2891._Fld34907RRef = T2892._IDRRef) AND (T2892._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2893
INNER JOIN _Reference79 T2894
ON (T2893._Fld2999 = Справочник.ПерерасчетНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2895
WHERE ((T2895._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2895._Fld26433_TYPE = \\010::bytea AND T2895._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2895._Fld26433_RRRef = T2893._IDRRef) AND (T2895._Fld26434RRef = T2894._IDRRef))) AND T2894._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2894._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document503_VT15154 T2898
WHERE ((T2898._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2891._Fld34907RRef = T2898._Document503_IDRRef) AND (NOT (((1=1))))))))) AND ((T2892._Fld15149RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2899
WHERE ((T2899._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2899._Fld22973RRef = T2894._IDRRef) AND (T2899._Fld22974_TYPE = \\010::bytea AND T2899._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2899._Fld22974_RRRef = T2892._Fld15149RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2900
WHERE ((T2900._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2900._Fld22980RRef = T2894._IDRRef) AND T2900._Fld22981_TYPE = CASE WHEN T2892._Fld15149RRef IS NOT NULL THEN \\010::bytea END AND T2900._Fld22981_RTRef = CASE WHEN T2892._Fld15149RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2900._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2891._Fld1194 = CAST(0 AS NUMERIC))) T2890
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\013::bytea AND T1._Fld22706_RRRef = T2890.IDRRef
LEFT OUTER JOIN (SELECT
T2902._PredefinedID AS PredefinedID_,
T2902._Marked AS Marked_,
T2902._IDRRef AS IDRRef,
T2902._Fld3656RRef AS Fld3656RRef,
T2902._Fld1194 AS Fld1194_
FROM _Reference134 T2902
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2903
INNER JOIN _Reference79 T2904
ON (T2903._Fld2999 = Справочник.МаршрутыПодписания::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2905
WHERE ((T2905._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2905._Fld26433_TYPE = \\010::bytea AND T2905._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2905._Fld26433_RRRef = T2903._IDRRef) AND (T2905._Fld26434RRef = T2904._IDRRef))) AND T2904._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2904._Fld1194 = CAST(0 AS NUMERIC))) AND (((T2902._Fld3656RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2908
WHERE ((T2908._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2908._Fld22973RRef = T2904._IDRRef) AND (T2908._Fld22974_TYPE = \\010::bytea AND T2908._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2908._Fld22974_RRRef = T2902._Fld3656RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2909
WHERE ((T2909._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2909._Fld22980RRef = T2904._IDRRef) AND T2909._Fld22981_TYPE = CASE WHEN T2902._Fld3656RRef IS NOT NULL THEN \\010::bytea END AND T2909._Fld22981_RTRef = CASE WHEN T2902._Fld3656RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2909._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR CASE WHEN T2902._PredefinedID > \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea THEN TRUE ELSE FALSE END = TRUE)))) AND (T2902._Fld1194 = CAST(0 AS NUMERIC))) T2901
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\206::bytea AND T1._Fld22706_RRRef = T2901.IDRRef
LEFT OUTER JOIN (SELECT
T2911._Marked AS Marked_,
T2911._IDRRef AS IDRRef,
T2911._Fld1194 AS Fld1194_,
T2911._Fld10715RRef AS Fld10715RRef
FROM _Document397 T2911
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2912
INNER JOIN _Reference79 T2913
ON (T2912._Fld2999 = Документ.ВосстановлениеНДСПоОбъектамНедвижимости::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2914
WHERE ((T2914._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2914._Fld26433_TYPE = \\010::bytea AND T2914._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2914._Fld26433_RRRef = T2912._IDRRef) AND (T2914._Fld26434RRef = T2913._IDRRef))) AND T2913._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2913._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2917
WHERE ((T2917._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2917._Fld22973RRef = T2913._IDRRef) AND (T2917._Fld22974_TYPE = \\010::bytea AND T2917._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2917._Fld22974_RRRef = T2911._Fld10715RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2918
WHERE ((T2918._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2918._Fld22980RRef = T2913._IDRRef) AND T2918._Fld22981_TYPE = \\010::bytea AND T2918._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2918._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2911._Fld1194 = CAST(0 AS NUMERIC))) T2910
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\215::bytea AND T1._Fld22706_RRRef = T2910.IDRRef
LEFT OUTER JOIN _Reference30898 T2919
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\262::bytea AND T1._Fld22706_RRRef = T2919._IDRRef) AND (T2919._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference304 T2920
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0010::bytea AND T1._Fld22706_RRRef = T2920._IDRRef) AND (T2920._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2922._Marked AS Marked_,
T2922._IDRRef AS IDRRef,
T2922._Fld36709RRef AS Fld36709RRef,
T2922._Fld1194 AS Fld1194_
FROM _Document36693 T2922
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2923
INNER JOIN _Reference79 T2924
ON (T2923._Fld2999 = Документ.ЗаявкаНаКредит::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2925
WHERE ((T2925._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2925._Fld26433_TYPE = \\010::bytea AND T2925._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2925._Fld26433_RRRef = T2923._IDRRef) AND (T2925._Fld26434RRef = T2924._IDRRef))) AND T2924._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2924._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2928
WHERE ((T2928._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2928._Fld22973RRef = T2924._IDRRef) AND (T2928._Fld22974_TYPE = \\010::bytea AND T2928._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2928._Fld22974_RRRef = T2922._Fld36709RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2929
WHERE ((T2929._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2929._Fld22980RRef = T2924._IDRRef) AND T2929._Fld22981_TYPE = \\010::bytea AND T2929._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2929._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2922._Fld1194 = CAST(0 AS NUMERIC))) T2921
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217U::bytea AND T1._Fld22706_RRRef = T2921.IDRRef
LEFT OUTER JOIN _Reference82 T2930
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000R::bytea AND T1._Fld22706_RRRef = T2930._IDRRef) AND (T2930._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2932._Marked AS Marked_,
T2932._IDRRef AS IDRRef,
T2932._Fld34413RRef AS Fld34413RRef,
T2932._Fld1194 AS Fld1194_
FROM _Reference34046 T2932
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document422 T2933
ON (T2932._Fld34413RRef = T2933._IDRRef) AND (T2933._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2934
INNER JOIN _Reference79 T2935
ON (T2934._Fld2999 = Справочник.ЗаявлениеВФССОВозмещенииРасходовНаПогребениеПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T2936
WHERE ((T2936._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2936._Fld26433_TYPE = \\010::bytea AND T2936._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2936._Fld26433_RRRef = T2934._IDRRef) AND (T2936._Fld26434RRef = T2935._IDRRef))) AND T2935._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2935._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document422_VT11793 T2939
WHERE ((T2939._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2932._Fld34413RRef = T2939._Document422_IDRRef) AND (NOT (((1=1))))))))) AND ((T2933._Fld11772RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T2940
WHERE ((T2940._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2940._Fld22973RRef = T2935._IDRRef) AND (T2940._Fld22974_TYPE = \\010::bytea AND T2940._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2940._Fld22974_RRRef = T2933._Fld11772RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T2941
WHERE ((T2941._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2941._Fld22980RRef = T2935._IDRRef) AND T2941._Fld22981_TYPE = CASE WHEN T2933._Fld11772RRef IS NOT NULL THEN \\010::bytea END AND T2941._Fld22981_RTRef = CASE WHEN T2933._Fld11772RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2941._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2932._Fld1194 = CAST(0 AS NUMERIC))) T2931
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\376::bytea AND T1._Fld22706_RRRef = T2931.IDRRef
LEFT OUTER JOIN _Reference32748 T2942
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\354::bytea AND T1._Fld22706_RRRef = T2942._IDRRef) AND (T2942._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference184 T2943
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\270::bytea AND T1._Fld22706_RRRef = T2943._IDRRef) AND (T2943._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference92 T2944
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\\\::bytea AND T1._Fld22706_RRRef = T2944._IDRRef) AND (T2944._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2946._Marked AS Marked_,
T2946._IDRRef AS IDRRef,
T2946._Fld35249RRef AS Fld35249RRef,
T2946._Fld1194 AS Fld1194_
FROM _Reference34068 T2946
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document575 T2947
ON (T2946._Fld35249RRef = T2947._IDRRef) AND (T2947._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2948
INNER JOIN _Reference79 T2949
ON (T2948._Fld2999 = Справочник.УведомлениеОПравеНаИмущественныйВычетДляНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2950
WHERE ((T2950._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2950._Fld26433_TYPE = \\010::bytea AND T2950._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2950._Fld26433_RRRef = T2948._IDRRef) AND (T2950._Fld26434RRef = T2949._IDRRef))) AND T2949._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2949._Fld1194 = CAST(0 AS NUMERIC))) AND (((T2947._Fld18821RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2953
WHERE ((T2953._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2953._Fld22973RRef = T2949._IDRRef) AND (T2953._Fld22974_TYPE = \\010::bytea AND T2953._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2953._Fld22974_RRRef = T2947._Fld18821RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2954
WHERE ((T2954._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2954._Fld22980RRef = T2949._IDRRef) AND T2954._Fld22981_TYPE = CASE WHEN T2947._Fld18821RRef IS NOT NULL THEN \\010::bytea END AND T2954._Fld22981_RTRef = CASE WHEN T2947._Fld18821RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2954._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T2947._Fld18822RRef IS NOT NULL))))))) AND (T2946._Fld1194 = CAST(0 AS NUMERIC))) T2945
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\024::bytea AND T1._Fld22706_RRRef = T2945.IDRRef
LEFT OUTER JOIN _Reference66 T2955
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000B::bytea AND T1._Fld22706_RRRef = T2955._IDRRef) AND (T2955._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2957._Marked AS Marked_,
T2957._IDRRef AS IDRRef,
T2957._Fld12177RRef AS Fld12177RRef,
T2957._Fld1194 AS Fld1194_
FROM _Document434 T2957
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2958
INNER JOIN _Reference79 T2959
ON (T2958._Fld2999 = Документ.ИзменениеСпособовОтраженияРасходовПоАмортизацииОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2960
WHERE ((T2960._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2960._Fld26433_TYPE = \\010::bytea AND T2960._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2960._Fld26433_RRRef = T2958._IDRRef) AND (T2960._Fld26434RRef = T2959._IDRRef))) AND T2959._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2959._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2963
WHERE ((T2963._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2963._Fld22973RRef = T2959._IDRRef) AND (T2963._Fld22974_TYPE = \\010::bytea AND T2963._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2963._Fld22974_RRRef = T2957._Fld12177RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2964
WHERE ((T2964._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2964._Fld22980RRef = T2959._IDRRef) AND T2964._Fld22981_TYPE = \\010::bytea AND T2964._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2964._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2957._Fld1194 = CAST(0 AS NUMERIC))) T2956
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\262::bytea AND T1._Fld22706_RRRef = T2956.IDRRef
LEFT OUTER JOIN (SELECT
T2966._Marked AS Marked_,
T2966._IDRRef AS IDRRef,
T2966._Fld44372RRef AS Fld44372RRef,
T2966._Fld1194 AS Fld1194_
FROM _Reference367 T2966
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document44055 T2967
ON (T2966._Fld44372RRef = T2967._IDRRef) AND (T2967._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document632 T2968
ON (T2967._Fld44110_TYPE = \\010::bytea AND T2967._Fld44110_RTRef = \\000\\000\\002x::bytea AND T2967._Fld44110_RRRef = T2968._IDRRef) AND (T2968._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document631 T2969
ON (T2967._Fld44110_TYPE = \\010::bytea AND T2967._Fld44110_RTRef = \\000\\000\\002w::bytea AND T2967._Fld44110_RRRef = T2969._IDRRef) AND (T2969._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2970
INNER JOIN _Reference79 T2971
ON (T2970._Fld2999 = Справочник.СообщениеЭДОПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T2972
WHERE ((T2972._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2972._Fld26433_TYPE = \\010::bytea AND T2972._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2972._Fld26433_RRRef = T2970._IDRRef) AND (T2972._Fld26434RRef = T2971._IDRRef))) AND T2971._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2971._Fld1194 = CAST(0 AS NUMERIC))) AND (((T2968._Fld20964RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2975
WHERE ((T2975._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2975._Fld22973RRef = T2971._IDRRef) AND (T2975._Fld22974_TYPE = \\010::bytea AND T2975._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2975._Fld22974_RRRef = T2968._Fld20964RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2976
WHERE ((T2976._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2976._Fld22980RRef = T2971._IDRRef) AND T2976._Fld22981_TYPE = CASE WHEN T2968._Fld20964RRef IS NOT NULL THEN \\010::bytea END AND T2976._Fld22981_RTRef = CASE WHEN T2968._Fld20964RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2976._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR ((T2969._Fld20927RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T2977
WHERE ((T2977._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2977._Fld22973RRef = T2971._IDRRef) AND (T2977._Fld22974_TYPE = \\010::bytea AND T2977._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2977._Fld22974_RRRef = T2969._Fld20927RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T2978
WHERE ((T2978._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2978._Fld22980RRef = T2971._IDRRef) AND T2978._Fld22981_TYPE = CASE WHEN T2969._Fld20927RRef IS NOT NULL THEN \\010::bytea END AND T2978._Fld22981_RTRef = CASE WHEN T2969._Fld20927RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T2978._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T2966._Fld1194 = CAST(0 AS NUMERIC))) T2965
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001o::bytea AND T1._Fld22706_RRRef = T2965.IDRRef
LEFT OUTER JOIN _Reference77 T2979
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000M::bytea AND T1._Fld22706_RRRef = T2979._IDRRef) AND (T2979._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2981._Marked AS Marked_,
T2981._IDRRef AS IDRRef,
T2981._Fld15064RRef AS Fld15064RRef,
T2981._Fld1194 AS Fld1194_
FROM _Document500 T2981
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2982
INNER JOIN _Reference79 T2983
ON (T2982._Fld2999 = Документ.ПеремещениеОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2984
WHERE ((T2984._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2984._Fld26433_TYPE = \\010::bytea AND T2984._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2984._Fld26433_RRRef = T2982._IDRRef) AND (T2984._Fld26434RRef = T2983._IDRRef))) AND T2983._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2983._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T2987
WHERE ((T2987._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2987._Fld22973RRef = T2983._IDRRef) AND (T2987._Fld22974_TYPE = \\010::bytea AND T2987._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T2987._Fld22974_RRRef = T2981._Fld15064RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T2988
WHERE ((T2988._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2988._Fld22980RRef = T2983._IDRRef) AND T2988._Fld22981_TYPE = \\010::bytea AND T2988._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T2988._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2981._Fld1194 = CAST(0 AS NUMERIC))) T2980
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\364::bytea AND T1._Fld22706_RRRef = T2980.IDRRef
LEFT OUTER JOIN _Reference145 T2989
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\221::bytea AND T1._Fld22706_RRRef = T2989._IDRRef) AND (T2989._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference135 T2990
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\207::bytea AND T1._Fld22706_RRRef = T2990._IDRRef) AND (T2990._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document390 T2991
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\206::bytea AND T1._Fld22706_RRRef = T2991._IDRRef) AND (T2991._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45479 T2992
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\247::bytea AND T1._Fld22706_RRRef = T2992._IDRRef) AND (T2992._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T2994._Marked AS Marked_,
T2994._IDRRef AS IDRRef,
T2994._Fld36906RRef AS Fld36906RRef,
T2994._Fld1194 AS Fld1194_
FROM _Reference36687 T2994
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T2995
INNER JOIN _Reference79 T2996
ON (T2995._Fld2999 = Справочник.ДокументооборотыОбменаСБанками::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T2997
WHERE ((T2997._Fld1194 = CAST(0 AS NUMERIC))) AND ((T2997._Fld26433_TYPE = \\010::bytea AND T2997._Fld26433_RTRef = \\000\\000\\000j::bytea AND T2997._Fld26433_RRRef = T2995._IDRRef) AND (T2997._Fld26434RRef = T2996._IDRRef))) AND T2996._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T2996._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3000
WHERE ((T3000._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3000._Fld22973RRef = T2996._IDRRef) AND (T3000._Fld22974_TYPE = \\010::bytea AND T3000._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3000._Fld22974_RRRef = T2994._Fld36906RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3001
WHERE ((T3001._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3001._Fld22980RRef = T2996._IDRRef) AND T3001._Fld22981_TYPE = \\010::bytea AND T3001._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3001._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T2994._Fld1194 = CAST(0 AS NUMERIC))) T2993
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217O::bytea AND T1._Fld22706_RRRef = T2993.IDRRef
LEFT OUTER JOIN _Reference30904 T3002
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\270::bytea AND T1._Fld22706_RRRef = T3002._IDRRef) AND (T3002._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference243 T3003
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\363::bytea AND T1._Fld22706_RRRef = T3003._IDRRef
LEFT OUTER JOIN (SELECT
T3005._Marked AS Marked_,
T3005._IDRRef AS IDRRef,
T3005._Fld18841RRef AS Fld18841RRef,
T3005._Fld1194 AS Fld1194_
FROM _Document576 T3005
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3006
INNER JOIN _Reference79 T3007
ON (T3006._Fld2999 = Документ.УведомлениеОСпецрежимахНалогообложения::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3008
WHERE ((T3008._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3008._Fld26433_TYPE = \\010::bytea AND T3008._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3008._Fld26433_RRRef = T3006._IDRRef) AND (T3008._Fld26434RRef = T3007._IDRRef))) AND T3007._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3007._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3011
WHERE ((T3011._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3011._Fld22973RRef = T3007._IDRRef) AND (T3011._Fld22974_TYPE = \\010::bytea AND T3011._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3011._Fld22974_RRRef = T3005._Fld18841RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3012
WHERE ((T3012._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3012._Fld22980RRef = T3007._IDRRef) AND T3012._Fld22981_TYPE = \\010::bytea AND T3012._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3012._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3005._Fld1194 = CAST(0 AS NUMERIC))) T3004
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002@::bytea AND T1._Fld22706_RRRef = T3004.IDRRef
LEFT OUTER JOIN (SELECT
T3014._Marked AS Marked_,
T3014._IDRRef AS IDRRef,
T3014._Fld9285RRef AS Fld9285RRef,
T3014._Fld9284RRef AS Fld9284RRef,
T3014._Fld1194 AS Fld1194_
FROM _Document376 T3014
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3015
INNER JOIN _Reference79 T3016
ON (T3015._Fld2999 = Документ.АвизоПрочееИсходящее::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T3017
WHERE ((T3017._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3017._Fld26433_TYPE = \\010::bytea AND T3017._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3017._Fld26433_RRRef = T3015._IDRRef) AND (T3017._Fld26434RRef = T3016._IDRRef))) AND T3016._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3016._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3020
WHERE ((T3020._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3020._Fld22973RRef = T3016._IDRRef) AND (T3020._Fld22974_TYPE = \\010::bytea AND T3020._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3020._Fld22974_RRRef = T3014._Fld9284RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3021
WHERE ((T3021._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3021._Fld22980RRef = T3016._IDRRef) AND T3021._Fld22981_TYPE = \\010::bytea AND T3021._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3021._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T3022
WHERE ((T3022._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3022._Fld22973RRef = T3016._IDRRef) AND (T3022._Fld22974_TYPE = \\010::bytea AND T3022._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3022._Fld22974_RRRef = T3014._Fld9285RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T3023
WHERE ((T3023._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3023._Fld22980RRef = T3016._IDRRef) AND T3023._Fld22981_TYPE = \\010::bytea AND T3023._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3023._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3014._Fld1194 = CAST(0 AS NUMERIC))) T3013
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001x::bytea AND T1._Fld22706_RRRef = T3013.IDRRef
LEFT OUTER JOIN _Reference248 T3024
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\370::bytea AND T1._Fld22706_RRRef = T3024._IDRRef) AND (T3024._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45395 T3025
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261S::bytea AND T1._Fld22706_RRRef = T3025._IDRRef) AND (T3025._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3027._Marked AS Marked_,
T3027._IDRRef AS IDRRef,
T3027._Fld17178RRef AS Fld17178RRef,
T3027._Fld1194 AS Fld1194_
FROM _Document541 T3027
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3028
INNER JOIN _Reference79 T3029
ON (T3028._Fld2999 = Документ.РеестрСЗВ_6_2::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T3030
WHERE ((T3030._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3030._Fld26433_TYPE = \\010::bytea AND T3030._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3030._Fld26433_RRRef = T3028._IDRRef) AND (T3030._Fld26434RRef = T3029._IDRRef))) AND T3029._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3029._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document541_VT17218 T3033
WHERE ((T3033._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3027._IDRRef = T3033._Document541_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T3034
WHERE ((T3034._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3034._Fld22973RRef = T3029._IDRRef) AND (T3034._Fld22974_TYPE = \\010::bytea AND T3034._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3034._Fld22974_RRRef = T3027._Fld17178RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T3035
WHERE ((T3035._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3035._Fld22980RRef = T3029._IDRRef) AND T3035._Fld22981_TYPE = \\010::bytea AND T3035._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3035._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3027._Fld1194 = CAST(0 AS NUMERIC))) T3026
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\035::bytea AND T1._Fld22706_RRRef = T3026.IDRRef
LEFT OUTER JOIN _Document39483 T3036
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\232;::bytea AND T1._Fld22706_RRRef = T3036._IDRRef) AND (T3036._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference238 T3037
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\356::bytea AND T1._Fld22706_RRRef = T3037._IDRRef) AND (T3037._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference45391 T3038
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261O::bytea AND T1._Fld22706_RRRef = T3038._IDRRef) AND (T3038._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3040._Marked AS Marked_,
T3040._IDRRef AS IDRRef,
T3040._Fld34565RRef AS Fld34565RRef,
T3040._Fld1194 AS Fld1194_
FROM _Reference34050 T3040
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document441 T3041
ON (T3040._Fld34565RRef = T3041._IDRRef) AND (T3041._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3042
INNER JOIN _Reference79 T3043
ON (T3042._Fld2999 = Справочник.КадровыйПереводПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3044
WHERE ((T3044._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3044._Fld26433_TYPE = \\010::bytea AND T3044._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3044._Fld26433_RRRef = T3042._IDRRef) AND (T3044._Fld26434RRef = T3043._IDRRef))) AND T3043._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3043._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3041._Fld12352RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3047
WHERE ((T3047._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3047._Fld22973RRef = T3043._IDRRef) AND (T3047._Fld22974_TYPE = \\010::bytea AND T3047._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3047._Fld22974_RRRef = T3041._Fld12352RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3048
WHERE ((T3048._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3048._Fld22980RRef = T3043._IDRRef) AND T3048._Fld22981_TYPE = CASE WHEN T3041._Fld12352RRef IS NOT NULL THEN \\010::bytea END AND T3048._Fld22981_RTRef = CASE WHEN T3041._Fld12352RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3048._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T3041._Fld12355RRef IS NOT NULL))))))) AND (T3040._Fld1194 = CAST(0 AS NUMERIC))) T3039
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\002::bytea AND T1._Fld22706_RRRef = T3039.IDRRef
LEFT OUTER JOIN _Reference30110 T3049
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000u\\236::bytea AND T1._Fld22706_RRRef = T3049._IDRRef) AND (T3049._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference54 T3050
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0006::bytea AND T1._Fld22706_RRRef = T3050._IDRRef) AND (T3050._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3052._Marked AS Marked_,
T3052._IDRRef AS IDRRef,
T3052._Fld9343RRef AS Fld9343RRef,
T3052._Fld9340RRef AS Fld9340RRef,
T3052._Fld1194 AS Fld1194_
FROM _Document378 T3052
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3053
INNER JOIN _Reference79 T3054
ON (T3053._Fld2999 = Документ.АвизоРасчетыИсходящее::mvarchar) AND EXISTS(SELECT
TRUE AS Q_006_F_000_
FROM _InfoRg26432 T3055
WHERE ((T3055._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3055._Fld26433_TYPE = \\010::bytea AND T3055._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3055._Fld26433_RRRef = T3053._IDRRef) AND (T3055._Fld26434RRef = T3054._IDRRef))) AND T3054._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3054._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3058
WHERE ((T3058._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3058._Fld22973RRef = T3054._IDRRef) AND (T3058._Fld22974_TYPE = \\010::bytea AND T3058._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3058._Fld22974_RRRef = T3052._Fld9340RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3059
WHERE ((T3059._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3059._Fld22980RRef = T3054._IDRRef) AND T3059._Fld22981_TYPE = \\010::bytea AND T3059._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3059._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) OR (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22972 T3060
WHERE ((T3060._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3060._Fld22973RRef = T3054._IDRRef) AND (T3060._Fld22974_TYPE = \\010::bytea AND T3060._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3060._Fld22974_RRRef = T3052._Fld9343RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg22979 T3061
WHERE ((T3061._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3061._Fld22980RRef = T3054._IDRRef) AND T3061._Fld22981_TYPE = \\010::bytea AND T3061._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3061._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3052._Fld1194 = CAST(0 AS NUMERIC))) T3051
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001z::bytea AND T1._Fld22706_RRRef = T3051.IDRRef
LEFT OUTER JOIN (SELECT
T3063._Marked AS Marked_,
T3063._IDRRef AS IDRRef,
T3063._Fld1194 AS Fld1194_,
T3063._Fld11811RRef AS Fld11811RRef,
T3063._Fld11810RRef AS Fld11810RRef
FROM _Document423 T3063
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3064
INNER JOIN _Reference79 T3065
ON (T3064._Fld2999 = Документ.ЗаявлениеНаПредоставлениеСтандартныхВычетовПоНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3066
WHERE ((T3066._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3066._Fld26433_TYPE = \\010::bytea AND T3066._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3066._Fld26433_RRRef = T3064._IDRRef) AND (T3066._Fld26434RRef = T3065._IDRRef))) AND T3065._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3065._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3069
WHERE ((T3069._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3069._Fld22973RRef = T3065._IDRRef) AND (T3069._Fld22974_TYPE = \\010::bytea AND T3069._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3069._Fld22974_RRRef = T3063._Fld11810RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3070
WHERE ((T3070._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3070._Fld22980RRef = T3065._IDRRef) AND T3070._Fld22981_TYPE = \\010::bytea AND T3070._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3070._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T3063._Fld1194 = CAST(0 AS NUMERIC))) T3062
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\247::bytea AND T1._Fld22706_RRRef = T3062.IDRRef
LEFT OUTER JOIN (SELECT
T3072._Marked AS Marked_,
T3072._IDRRef AS IDRRef,
T3072._Fld12110RRef AS Fld12110RRef,
T3072._Fld1194 AS Fld1194_
FROM _Document429 T3072
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3073
INNER JOIN _Reference79 T3074
ON (T3073._Fld2999 = Документ.ИзменениеПараметровНачисленияАмортизацииОС::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3075
WHERE ((T3075._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3075._Fld26433_TYPE = \\010::bytea AND T3075._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3075._Fld26433_RRRef = T3073._IDRRef) AND (T3075._Fld26434RRef = T3074._IDRRef))) AND T3074._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3074._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3078
WHERE ((T3078._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3078._Fld22973RRef = T3074._IDRRef) AND (T3078._Fld22974_TYPE = \\010::bytea AND T3078._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3078._Fld22974_RRRef = T3072._Fld12110RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3079
WHERE ((T3079._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3079._Fld22980RRef = T3074._IDRRef) AND T3079._Fld22981_TYPE = \\010::bytea AND T3079._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3079._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3072._Fld1194 = CAST(0 AS NUMERIC))) T3071
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\255::bytea AND T1._Fld22706_RRRef = T3071.IDRRef
LEFT OUTER JOIN (SELECT
T3081._Marked AS Marked_,
T3081._IDRRef AS IDRRef,
T3081._Fld38399RRef AS Fld38399RRef,
T3081._Fld1194 AS Fld1194_
FROM _Reference38290 T3081
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document38293 T3082
ON (T3081._Fld38399RRef = T3082._IDRRef) AND (T3082._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3083
INNER JOIN _Reference79 T3084
ON (T3083._Fld2999 = Справочник.СведенияОТрудовойДеятельностиРаботникаСТД_РПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3085
WHERE ((T3085._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3085._Fld26433_TYPE = \\010::bytea AND T3085._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3085._Fld26433_RRRef = T3083._IDRRef) AND (T3085._Fld26434RRef = T3084._IDRRef))) AND T3084._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3084._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3082._Fld38296RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3088
WHERE ((T3088._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3088._Fld22973RRef = T3084._IDRRef) AND (T3088._Fld22974_TYPE = \\010::bytea AND T3088._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3088._Fld22974_RRRef = T3082._Fld38296RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3089
WHERE ((T3089._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3089._Fld22980RRef = T3084._IDRRef) AND T3089._Fld22981_TYPE = CASE WHEN T3082._Fld38296RRef IS NOT NULL THEN \\010::bytea END AND T3089._Fld22981_RTRef = CASE WHEN T3082._Fld38296RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3089._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T3082._Fld38298RRef IS NOT NULL))))))) AND (T3081._Fld1194 = CAST(0 AS NUMERIC))) T3080
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\225\\222::bytea AND T1._Fld22706_RRRef = T3080.IDRRef
LEFT OUTER JOIN _Document40369 T3090
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\235\\261::bytea AND T1._Fld22706_RRRef = T3090._IDRRef) AND (T3090._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference36290 T3091
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\215\\302::bytea AND T1._Fld22706_RRRef = T3091._IDRRef) AND (T3091._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference30903 T3092
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\267::bytea AND T1._Fld22706_RRRef = T3092._IDRRef) AND (T3092._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3094._Marked AS Marked_,
T3094._IDRRef AS IDRRef,
T3094._Fld14233RRef AS Fld14233RRef,
T3094._Fld1194 AS Fld1194_
FROM _Document479 T3094
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3095
INNER JOIN _Reference79 T3096
ON (T3095._Fld2999 = Документ.Партия::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3097
WHERE ((T3097._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3097._Fld26433_TYPE = \\010::bytea AND T3097._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3097._Fld26433_RRRef = T3095._IDRRef) AND (T3097._Fld26434RRef = T3096._IDRRef))) AND T3096._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3096._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3100
WHERE ((T3100._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3100._Fld22973RRef = T3096._IDRRef) AND (T3100._Fld22974_TYPE = \\010::bytea AND T3100._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3100._Fld22974_RRRef = T3094._Fld14233RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3101
WHERE ((T3101._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3101._Fld22980RRef = T3096._IDRRef) AND T3101._Fld22981_TYPE = \\010::bytea AND T3101._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3101._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3094._Fld1194 = CAST(0 AS NUMERIC))) T3093
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\337::bytea AND T1._Fld22706_RRRef = T3093.IDRRef
LEFT OUTER JOIN (SELECT
T3103._Marked AS Marked_,
T3103._IDRRef AS IDRRef,
T3103._Fld48027RRef AS Fld48027RRef,
T3103._Fld1194 AS Fld1194_
FROM _Document45546 T3103
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Reference159 T3104
ON ((T3104._Fld4110RRef = T3103._Fld48027RRef) AND (T3104._Fld4110RRef <> \\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000::bytea) OR (T3104._IDRRef = T3103._Fld48027RRef)) AND (T3104._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3105
INNER JOIN _Reference79 T3106
ON (T3105._Fld2999 = Документ.ВерсияСоглашенияЛизинг::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3107
WHERE ((T3107._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3107._Fld26433_TYPE = \\010::bytea AND T3107._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3107._Fld26433_RRRef = T3105._IDRRef) AND (T3107._Fld26434RRef = T3106._IDRRef))) AND T3106._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3106._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3104._IDRRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3110
WHERE ((T3110._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3110._Fld22973RRef = T3106._IDRRef) AND (T3110._Fld22974_TYPE = \\010::bytea AND T3110._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3110._Fld22974_RRRef = T3104._IDRRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3111
WHERE ((T3111._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3111._Fld22980RRef = T3106._IDRRef) AND T3111._Fld22981_TYPE = CASE WHEN T3104._IDRRef IS NOT NULL THEN \\010::bytea END AND T3111._Fld22981_RTRef = CASE WHEN T3104._IDRRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3111._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T3103._Fld1194 = CAST(0 AS NUMERIC))) T3102
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\352::bytea AND T1._Fld22706_RRRef = T3102.IDRRef
LEFT OUTER JOIN _Reference52 T3112
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0004::bytea AND T1._Fld22706_RRRef = T3112._IDRRef) AND (T3112._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3114._Marked AS Marked_,
T3114._IDRRef AS IDRRef,
T3114._Fld1194 AS Fld1194_,
T3114._Fld11935RRef AS Fld11935RRef,
T3114._Fld11933RRef AS Fld11933RRef
FROM _Document426 T3114
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3115
INNER JOIN _Reference79 T3116
ON (T3115._Fld2999 = Документ.ЗаявлениеСотрудникаНаВыплатуПособия::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3117
WHERE ((T3117._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3117._Fld26433_TYPE = \\010::bytea AND T3117._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3117._Fld26433_RRRef = T3115._IDRRef) AND (T3117._Fld26434RRef = T3116._IDRRef))) AND T3116._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3116._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3120
WHERE ((T3120._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3120._Fld22973RRef = T3116._IDRRef) AND (T3120._Fld22974_TYPE = \\010::bytea AND T3120._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3120._Fld22974_RRRef = T3114._Fld11933RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3121
WHERE ((T3121._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3121._Fld22980RRef = T3116._IDRRef) AND T3121._Fld22981_TYPE = \\010::bytea AND T3121._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3121._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T3114._Fld1194 = CAST(0 AS NUMERIC))) T3113
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\252::bytea AND T1._Fld22706_RRRef = T3113.IDRRef
LEFT OUTER JOIN (SELECT
T3123._Marked AS Marked_,
T3123._IDRRef AS IDRRef,
T3123._Fld38250RRef AS Fld38250RRef,
T3123._Fld1194 AS Fld1194_
FROM _Reference38079 T3123
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document38080 T3124
ON (T3123._Fld38250RRef = T3124._IDRRef) AND (T3124._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3125
INNER JOIN _Reference79 T3126
ON (T3125._Fld2999 = Справочник.ЗаявленияОПредоставленииСведенийОТрудовойДеятельностиПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T3127
WHERE ((T3127._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3127._Fld26433_TYPE = \\010::bytea AND T3127._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3127._Fld26433_RRRef = T3125._IDRRef) AND (T3127._Fld26434RRef = T3126._IDRRef))) AND T3126._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3126._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document38080_VT38098 T3130
WHERE ((T3130._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3123._Fld38250RRef = T3130._Document38080_IDRRef) AND (NOT (((1=1))))))))) AND ((T3124._Fld38087RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T3131
WHERE ((T3131._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3131._Fld22973RRef = T3126._IDRRef) AND (T3131._Fld22974_TYPE = \\010::bytea AND T3131._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3131._Fld22974_RRRef = T3124._Fld38087RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T3132
WHERE ((T3132._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3132._Fld22980RRef = T3126._IDRRef) AND T3132._Fld22981_TYPE = CASE WHEN T3124._Fld38087RRef IS NOT NULL THEN \\010::bytea END AND T3132._Fld22981_RTRef = CASE WHEN T3124._Fld38087RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3132._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T3123._Fld1194 = CAST(0 AS NUMERIC))) T3122
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\224\\277::bytea AND T1._Fld22706_RRRef = T3122.IDRRef
LEFT OUTER JOIN (SELECT
T3134._Marked AS Marked_,
T3134._IDRRef AS IDRRef,
T3134._Fld35021RRef AS Fld35021RRef,
T3134._Fld1194 AS Fld1194_
FROM _Reference34062 T3134
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document521 T3135
ON (T3134._Fld35021RRef = T3135._IDRRef) AND (T3135._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3136
INNER JOIN _Reference79 T3137
ON (T3136._Fld2999 = Справочник.ПриемНаРаботуПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3138
WHERE ((T3138._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3138._Fld26433_TYPE = \\010::bytea AND T3138._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3138._Fld26433_RRRef = T3136._IDRRef) AND (T3138._Fld26434RRef = T3137._IDRRef))) AND T3137._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3137._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3135._Fld16250RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3141
WHERE ((T3141._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3141._Fld22973RRef = T3137._IDRRef) AND (T3141._Fld22974_TYPE = \\010::bytea AND T3141._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3141._Fld22974_RRRef = T3135._Fld16250RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3142
WHERE ((T3142._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3142._Fld22980RRef = T3137._IDRRef) AND T3142._Fld22981_TYPE = CASE WHEN T3135._Fld16250RRef IS NOT NULL THEN \\010::bytea END AND T3142._Fld22981_RTRef = CASE WHEN T3135._Fld16250RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3142._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T3135._Fld16253RRef IS NOT NULL))))))) AND (T3134._Fld1194 = CAST(0 AS NUMERIC))) T3133
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\016::bytea AND T1._Fld22706_RRRef = T3133.IDRRef
LEFT OUTER JOIN _Reference45461 T3143
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\225::bytea AND T1._Fld22706_RRRef = T3143._IDRRef) AND (T3143._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3145._Marked AS Marked_,
T3145._IDRRef AS IDRRef,
T3145._Fld7831RRef AS Fld7831RRef,
T3145._Fld1194 AS Fld1194_
FROM _Reference301 T3145
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3146
INNER JOIN _Reference79 T3147
ON (T3146._Fld2999 = Справочник.ТорговыеТочки::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3148
WHERE ((T3148._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3148._Fld26433_TYPE = \\010::bytea AND T3148._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3148._Fld26433_RRRef = T3146._IDRRef) AND (T3148._Fld26434RRef = T3147._IDRRef))) AND T3147._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3147._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3151
WHERE ((T3151._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3151._Fld22973RRef = T3147._IDRRef) AND (T3151._Fld22974_TYPE = \\010::bytea AND T3151._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3151._Fld22974_RRRef = T3145._Fld7831RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3152
WHERE ((T3152._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3152._Fld22980RRef = T3147._IDRRef) AND T3152._Fld22981_TYPE = \\010::bytea AND T3152._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3152._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3145._Fld1194 = CAST(0 AS NUMERIC))) T3144
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001-::bytea AND T1._Fld22706_RRRef = T3144.IDRRef
LEFT OUTER JOIN _Reference164 T3153
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\244::bytea AND T1._Fld22706_RRRef = T3153._IDRRef
LEFT OUTER JOIN (SELECT
T3155._Marked AS Marked_,
T3155._IDRRef AS IDRRef,
T3155._Fld39197RRef AS Fld39197RRef,
T3155._Fld1194 AS Fld1194_
FROM _Reference38855 T3155
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document38860 T3156
ON (T3155._Fld39197RRef = T3156._IDRRef) AND (T3156._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3157
INNER JOIN _Reference79 T3158
ON (T3157._Fld2999 = Справочник.ДоговорРаботыУслугиПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3159
WHERE ((T3159._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3159._Fld26433_TYPE = \\010::bytea AND T3159._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3159._Fld26433_RRRef = T3157._IDRRef) AND (T3159._Fld26434RRef = T3158._IDRRef))) AND T3158._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3158._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3156._Fld38867RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3162
WHERE ((T3162._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3162._Fld22973RRef = T3158._IDRRef) AND (T3162._Fld22974_TYPE = \\010::bytea AND T3162._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3162._Fld22974_RRRef = T3156._Fld38867RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3163
WHERE ((T3163._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3163._Fld22980RRef = T3158._IDRRef) AND T3163._Fld22981_TYPE = CASE WHEN T3156._Fld38867RRef IS NOT NULL THEN \\010::bytea END AND T3163._Fld22981_RTRef = CASE WHEN T3156._Fld38867RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3163._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T3156._Fld38870RRef IS NOT NULL))))))) AND (T3155._Fld1194 = CAST(0 AS NUMERIC))) T3154
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\307::bytea AND T1._Fld22706_RRRef = T3154.IDRRef
LEFT OUTER JOIN _Reference45291 T3164
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\353::bytea AND T1._Fld22706_RRRef = T3164._IDRRef) AND (T3164._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document37384 T3165
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\010::bytea AND T1._Fld22706_RRRef = T3165._IDRRef) AND (T3165._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference247 T3166
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\367::bytea AND T1._Fld22706_RRRef = T3166._IDRRef) AND (T3166._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3168._Marked AS Marked_,
T3168._IDRRef AS IDRRef,
T3168._Fld38298RRef AS Fld38298RRef,
T3168._Fld38296RRef AS Fld38296RRef,
T3168._Fld1194 AS Fld1194_
FROM _Document38293 T3168
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3169
INNER JOIN _Reference79 T3170
ON (T3169._Fld2999 = Документ.СведенияОТрудовойДеятельностиРаботникаСТД_Р::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3171
WHERE ((T3171._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3171._Fld26433_TYPE = \\010::bytea AND T3171._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3171._Fld26433_RRRef = T3169._IDRRef) AND (T3171._Fld26434RRef = T3170._IDRRef))) AND T3170._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3170._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3174
WHERE ((T3174._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3174._Fld22973RRef = T3170._IDRRef) AND (T3174._Fld22974_TYPE = \\010::bytea AND T3174._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3174._Fld22974_RRRef = T3168._Fld38296RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3175
WHERE ((T3175._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3175._Fld22980RRef = T3170._IDRRef) AND T3175._Fld22981_TYPE = \\010::bytea AND T3175._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3175._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T3168._Fld1194 = CAST(0 AS NUMERIC))) T3167
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\225\\225::bytea AND T1._Fld22706_RRRef = T3167.IDRRef
LEFT OUTER JOIN (SELECT
T3177._Marked AS Marked_,
T3177._IDRRef AS IDRRef,
T3177._Fld15491RRef AS Fld15491RRef,
T3177._Fld1194 AS Fld1194_
FROM _Document514 T3177
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3178
INNER JOIN _Reference79 T3179
ON (T3178._Fld2999 = Документ.ПоступлениеДопРасходов::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3180
WHERE ((T3180._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3180._Fld26433_TYPE = \\010::bytea AND T3180._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3180._Fld26433_RRRef = T3178._IDRRef) AND (T3180._Fld26434RRef = T3179._IDRRef))) AND T3179._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3179._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3183
WHERE ((T3183._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3183._Fld22973RRef = T3179._IDRRef) AND (T3183._Fld22974_TYPE = \\010::bytea AND T3183._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3183._Fld22974_RRRef = T3177._Fld15491RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3184
WHERE ((T3184._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3184._Fld22980RRef = T3179._IDRRef) AND T3184._Fld22981_TYPE = \\010::bytea AND T3184._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3184._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3177._Fld1194 = CAST(0 AS NUMERIC))) T3176
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\002::bytea AND T1._Fld22706_RRRef = T3176.IDRRef
LEFT OUTER JOIN _Reference36690 T3185
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217R::bytea AND T1._Fld22706_RRRef = T3185._IDRRef) AND (T3185._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Document37383 T3186
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\007::bytea AND T1._Fld22706_RRRef = T3186._IDRRef) AND (T3186._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3188._Marked AS Marked_,
T3188._IDRRef AS IDRRef,
T3188._Fld16276RRef AS Fld16276RRef,
T3188._Fld1194 AS Fld1194_
FROM _Document522 T3188
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3189
INNER JOIN _Reference79 T3190
ON (T3189._Fld2999 = Документ.ПринятиеКУчетуНМА::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3191
WHERE ((T3191._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3191._Fld26433_TYPE = \\010::bytea AND T3191._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3191._Fld26433_RRRef = T3189._IDRRef) AND (T3191._Fld26434RRef = T3190._IDRRef))) AND T3190._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3190._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3194
WHERE ((T3194._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3194._Fld22973RRef = T3190._IDRRef) AND (T3194._Fld22974_TYPE = \\010::bytea AND T3194._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3194._Fld22974_RRRef = T3188._Fld16276RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3195
WHERE ((T3195._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3195._Fld22980RRef = T3190._IDRRef) AND T3195._Fld22981_TYPE = \\010::bytea AND T3195._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3195._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3188._Fld1194 = CAST(0 AS NUMERIC))) T3187
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\012::bytea AND T1._Fld22706_RRRef = T3187.IDRRef
LEFT OUTER JOIN _Reference35669 T3196
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\213U::bytea AND T1._Fld22706_RRRef = T3196._IDRRef) AND (T3196._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference36291 T3197
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\215\\303::bytea AND T1._Fld22706_RRRef = T3197._IDRRef) AND (T3197._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3199._Marked AS Marked_,
T3199._IDRRef AS IDRRef,
T3199._Fld1194 AS Fld1194_,
T3199._Fld10410RRef AS Fld10410RRef
FROM _Document388 T3199
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3200
INNER JOIN _Reference79 T3201
ON (T3200._Fld2999 = Документ.ВедомостьНаВыплатуЗарплатыВКассу::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T3202
WHERE ((T3202._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3202._Fld26433_TYPE = \\010::bytea AND T3202._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3202._Fld26433_RRRef = T3200._IDRRef) AND (T3202._Fld26434RRef = T3201._IDRRef))) AND T3201._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3201._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document388_VT10442 T3205
WHERE ((T3205._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3199._IDRRef = T3205._Document388_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T3206
WHERE ((T3206._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3206._Fld22973RRef = T3201._IDRRef) AND (T3206._Fld22974_TYPE = \\010::bytea AND T3206._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3206._Fld22974_RRRef = T3199._Fld10410RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T3207
WHERE ((T3207._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3207._Fld22980RRef = T3201._IDRRef) AND T3207._Fld22981_TYPE = \\010::bytea AND T3207._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3207._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3199._Fld1194 = CAST(0 AS NUMERIC))) T3198
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\204::bytea AND T1._Fld22706_RRRef = T3198.IDRRef
LEFT OUTER JOIN _Reference45309 T3208
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\375::bytea AND T1._Fld22706_RRRef = T3208._IDRRef) AND (T3208._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3210._Marked AS Marked_,
T3210._IDRRef AS IDRRef,
T3210._Fld34793RRef AS Fld34793RRef,
T3210._Fld1194 AS Fld1194_
FROM _Reference34056 T3210
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document34071 T3211
ON (T3210._Fld34793RRef = T3211._IDRRef) AND (T3211._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3212
INNER JOIN _Reference79 T3213
ON (T3212._Fld2999 = Справочник.ОтпускБезСохраненияОплатыПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3214
WHERE ((T3214._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3214._Fld26433_TYPE = \\010::bytea AND T3214._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3214._Fld26433_RRRef = T3212._IDRRef) AND (T3214._Fld26434RRef = T3213._IDRRef))) AND T3213._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3213._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3211._Fld34076RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3217
WHERE ((T3217._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3217._Fld22973RRef = T3213._IDRRef) AND (T3217._Fld22974_TYPE = \\010::bytea AND T3217._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3217._Fld22974_RRRef = T3211._Fld34076RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3218
WHERE ((T3218._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3218._Fld22980RRef = T3213._IDRRef) AND T3218._Fld22981_TYPE = CASE WHEN T3211._Fld34076RRef IS NOT NULL THEN \\010::bytea END AND T3218._Fld22981_RTRef = CASE WHEN T3211._Fld34076RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3218._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T3211._Fld34078RRef IS NOT NULL))))))) AND (T3210._Fld1194 = CAST(0 AS NUMERIC))) T3209
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\010::bytea AND T1._Fld22706_RRRef = T3209.IDRRef
LEFT OUTER JOIN _Reference281 T3219
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\031::bytea AND T1._Fld22706_RRRef = T3219._IDRRef) AND (T3219._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference32750 T3220
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\356::bytea AND T1._Fld22706_RRRef = T3220._IDRRef) AND (T3220._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3222._Marked AS Marked_,
T3222._IDRRef AS IDRRef,
T3222._Fld17627RRef AS Fld17627RRef,
T3222._Fld1194 AS Fld1194_
FROM _Document552 T3222
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3223
INNER JOIN _Reference79 T3224
ON (T3223._Fld2999 = Документ.СписаниеНМА::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3225
WHERE ((T3225._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3225._Fld26433_TYPE = \\010::bytea AND T3225._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3225._Fld26433_RRRef = T3223._IDRRef) AND (T3225._Fld26434RRef = T3224._IDRRef))) AND T3224._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3224._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3228
WHERE ((T3228._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3228._Fld22973RRef = T3224._IDRRef) AND (T3228._Fld22974_TYPE = \\010::bytea AND T3228._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3228._Fld22974_RRRef = T3222._Fld17627RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3229
WHERE ((T3229._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3229._Fld22980RRef = T3224._IDRRef) AND T3229._Fld22981_TYPE = \\010::bytea AND T3229._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3229._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3222._Fld1194 = CAST(0 AS NUMERIC))) T3221
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002(::bytea AND T1._Fld22706_RRRef = T3221.IDRRef
LEFT OUTER JOIN (SELECT
T3231._Marked AS Marked_,
T3231._IDRRef AS IDRRef,
T3231._Fld4061RRef AS Fld4061RRef,
T3231._Fld1194 AS Fld1194_
FROM _Reference158 T3231
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document462 T3232
ON (T3231._Fld4061RRef = T3232._IDRRef) AND (T3232._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3233
INNER JOIN _Reference79 T3234
ON (T3233._Fld2999 = Справочник.ОписьПачекСЗВ_6ПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3235
WHERE ((T3235._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3235._Fld26433_TYPE = \\010::bytea AND T3235._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3235._Fld26433_RRRef = T3233._IDRRef) AND (T3235._Fld26434RRef = T3234._IDRRef))) AND T3234._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3234._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3232._Fld13406RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3238
WHERE ((T3238._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3238._Fld22973RRef = T3234._IDRRef) AND (T3238._Fld22974_TYPE = \\010::bytea AND T3238._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3238._Fld22974_RRRef = T3232._Fld13406RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3239
WHERE ((T3239._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3239._Fld22980RRef = T3234._IDRRef) AND T3239._Fld22981_TYPE = CASE WHEN T3232._Fld13406RRef IS NOT NULL THEN \\010::bytea END AND T3239._Fld22981_RTRef = CASE WHEN T3232._Fld13406RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3239._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T3231._Fld1194 = CAST(0 AS NUMERIC))) T3230
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\236::bytea AND T1._Fld22706_RRRef = T3230.IDRRef
LEFT OUTER JOIN _Reference267 T3240
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\013::bytea AND T1._Fld22706_RRRef = T3240._IDRRef) AND (T3240._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3242._Marked AS Marked_,
T3242._IDRRef AS IDRRef,
T3242._Fld14755RRef AS Fld14755RRef,
T3242._Fld1194 AS Fld1194_
FROM _Document491 T3242
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3243
INNER JOIN _Reference79 T3244
ON (T3243._Fld2999 = Документ.ПачкаРазделов6РасчетаРСВ_1::mvarchar) AND EXISTS(SELECT
TRUE AS Q_005_F_000_
FROM _InfoRg26432 T3245
WHERE ((T3245._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3245._Fld26433_TYPE = \\010::bytea AND T3245._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3245._Fld26433_RRRef = T3243._IDRRef) AND (T3245._Fld26434RRef = T3244._IDRRef))) AND T3244._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3244._Fld1194 = CAST(0 AS NUMERIC))) AND ((NOT ((EXISTS(SELECT
FALSE AS Q_002_F_000_
FROM _Document491_VT14823 T3248
WHERE ((T3248._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3242._IDRRef = T3248._Document491_IDRRef) AND (NOT (((1=1))))))))) AND (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22972 T3249
WHERE ((T3249._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3249._Fld22973RRef = T3244._IDRRef) AND (T3249._Fld22974_TYPE = \\010::bytea AND T3249._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3249._Fld22974_RRRef = T3242._Fld14755RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg22979 T3250
WHERE ((T3250._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3250._Fld22980RRef = T3244._IDRRef) AND T3250._Fld22981_TYPE = \\010::bytea AND T3250._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3250._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3242._Fld1194 = CAST(0 AS NUMERIC))) T3241
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\353::bytea AND T1._Fld22706_RRRef = T3241.IDRRef
LEFT OUTER JOIN _Reference36688 T3251
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217P::bytea AND T1._Fld22706_RRRef = T3251._IDRRef
LEFT OUTER JOIN (SELECT
T3253._Marked AS Marked_,
T3253._IDRRef AS IDRRef,
T3253._Fld44391RRef AS Fld44391RRef,
T3253._Fld1194 AS Fld1194_
FROM _Document44384 T3253
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3254
INNER JOIN _Reference79 T3255
ON (T3254._Fld2999 = Документ.СтатистикаПерсонала::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3256
WHERE ((T3256._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3256._Fld26433_TYPE = \\010::bytea AND T3256._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3256._Fld26433_RRRef = T3254._IDRRef) AND (T3256._Fld26434RRef = T3255._IDRRef))) AND T3255._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3255._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3259
WHERE ((T3259._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3259._Fld22973RRef = T3255._IDRRef) AND (T3259._Fld22974_TYPE = \\010::bytea AND T3259._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3259._Fld22974_RRRef = T3253._Fld44391RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3260
WHERE ((T3260._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3260._Fld22980RRef = T3255._IDRRef) AND T3260._Fld22981_TYPE = \\010::bytea AND T3260._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3260._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3253._Fld1194 = CAST(0 AS NUMERIC))) T3252
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255`::bytea AND T1._Fld22706_RRRef = T3252.IDRRef
LEFT OUTER JOIN _Reference106 T3261
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000j::bytea AND T1._Fld22706_RRRef = T3261._IDRRef
LEFT OUTER JOIN (SELECT
T3263._Marked AS Marked_,
T3263._IDRRef AS IDRRef,
T3263._Fld1194 AS Fld1194_,
T3263._Fld10449RRef AS Fld10449RRef
FROM _Document389 T3263
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3264
INNER JOIN _Reference79 T3265
ON (T3264._Fld2999 = Документ.ВедомостьУплатыАДВ_11::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3266
WHERE ((T3266._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3266._Fld26433_TYPE = \\010::bytea AND T3266._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3266._Fld26433_RRRef = T3264._IDRRef) AND (T3266._Fld26434RRef = T3265._IDRRef))) AND T3265._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3265._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3269
WHERE ((T3269._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3269._Fld22973RRef = T3265._IDRRef) AND (T3269._Fld22974_TYPE = \\010::bytea AND T3269._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3269._Fld22974_RRRef = T3263._Fld10449RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3270
WHERE ((T3270._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3270._Fld22980RRef = T3265._IDRRef) AND T3270._Fld22981_TYPE = \\010::bytea AND T3270._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3270._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3263._Fld1194 = CAST(0 AS NUMERIC))) T3262
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\205::bytea AND T1._Fld22706_RRRef = T3262.IDRRef
LEFT OUTER JOIN (SELECT
T3272._Marked AS Marked_,
T3272._IDRRef AS IDRRef,
T3272._Fld17224RRef AS Fld17224RRef,
T3272._Fld1194 AS Fld1194_
FROM _Document542 T3272
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3273
INNER JOIN _Reference79 T3274
ON (T3273._Fld2999 = Документ.РеестрСчетовФактурПоставщика::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3275
WHERE ((T3275._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3275._Fld26433_TYPE = \\010::bytea AND T3275._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3275._Fld26433_RRRef = T3273._IDRRef) AND (T3275._Fld26434RRef = T3274._IDRRef))) AND T3274._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3274._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3278
WHERE ((T3278._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3278._Fld22973RRef = T3274._IDRRef) AND (T3278._Fld22974_TYPE = \\010::bytea AND T3278._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3278._Fld22974_RRRef = T3272._Fld17224RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3279
WHERE ((T3279._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3279._Fld22980RRef = T3274._IDRRef) AND T3279._Fld22981_TYPE = \\010::bytea AND T3279._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3279._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3272._Fld1194 = CAST(0 AS NUMERIC))) T3271
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\036::bytea AND T1._Fld22706_RRRef = T3271.IDRRef
LEFT OUTER JOIN _Reference38856 T3280
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\310::bytea AND T1._Fld22706_RRRef = T3280._IDRRef) AND (T3280._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3282._Marked AS Marked_,
T3282._IDRRef AS IDRRef,
T3282._Fld1194 AS Fld1194_,
T3282._Fld11119RRef AS Fld11119RRef
FROM _Document409 T3282
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3283
INNER JOIN _Reference79 T3284
ON (T3283._Fld2999 = Документ.ДопЛистКнигиПокупокДляПередачиВЭлектронномВиде::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3285
WHERE ((T3285._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3285._Fld26433_TYPE = \\010::bytea AND T3285._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3285._Fld26433_RRRef = T3283._IDRRef) AND (T3285._Fld26434RRef = T3284._IDRRef))) AND T3284._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3284._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3288
WHERE ((T3288._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3288._Fld22973RRef = T3284._IDRRef) AND (T3288._Fld22974_TYPE = \\010::bytea AND T3288._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3288._Fld22974_RRRef = T3282._Fld11119RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3289
WHERE ((T3289._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3289._Fld22980RRef = T3284._IDRRef) AND T3289._Fld22981_TYPE = \\010::bytea AND T3289._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3289._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3282._Fld1194 = CAST(0 AS NUMERIC))) T3281
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\231::bytea AND T1._Fld22706_RRRef = T3281.IDRRef
LEFT OUTER JOIN (SELECT
T3291._Marked AS Marked_,
T3291._IDRRef AS IDRRef,
T3291._Fld35325RRef AS Fld35325RRef,
T3291._Fld1194 AS Fld1194_
FROM _Reference34070 T3291
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document578 T3292
ON (T3291._Fld35325RRef = T3292._IDRRef) AND (T3292._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3293
INNER JOIN _Reference79 T3294
ON (T3293._Fld2999 = Справочник.УвольнениеПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3295
WHERE ((T3295._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3295._Fld26433_TYPE = \\010::bytea AND T3295._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3295._Fld26433_RRRef = T3293._IDRRef) AND (T3295._Fld26434RRef = T3294._IDRRef))) AND T3294._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3294._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3292._Fld18869RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3298
WHERE ((T3298._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3298._Fld22973RRef = T3294._IDRRef) AND (T3298._Fld22974_TYPE = \\010::bytea AND T3298._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3298._Fld22974_RRRef = T3292._Fld18869RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3299
WHERE ((T3299._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3299._Fld22980RRef = T3294._IDRRef) AND T3299._Fld22981_TYPE = CASE WHEN T3292._Fld18869RRef IS NOT NULL THEN \\010::bytea END AND T3299._Fld22981_RTRef = CASE WHEN T3292._Fld18869RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3299._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T3292._Fld18872RRef IS NOT NULL))))))) AND (T3291._Fld1194 = CAST(0 AS NUMERIC))) T3290
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\026::bytea AND T1._Fld22706_RRRef = T3290.IDRRef
LEFT OUTER JOIN (SELECT
T3301._Marked AS Marked_,
T3301._IDRRef AS IDRRef,
T3301._Fld15081RRef AS Fld15081RRef,
T3301._Fld1194 AS Fld1194_
FROM _Document501 T3301
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3302
INNER JOIN _Reference79 T3303
ON (T3302._Fld2999 = Документ.ПеремещениеТоваров::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3304
WHERE ((T3304._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3304._Fld26433_TYPE = \\010::bytea AND T3304._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3304._Fld26433_RRRef = T3302._IDRRef) AND (T3304._Fld26434RRef = T3303._IDRRef))) AND T3303._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3303._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3307
WHERE ((T3307._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3307._Fld22973RRef = T3303._IDRRef) AND (T3307._Fld22974_TYPE = \\010::bytea AND T3307._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3307._Fld22974_RRRef = T3301._Fld15081RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3308
WHERE ((T3308._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3308._Fld22980RRef = T3303._IDRRef) AND T3308._Fld22981_TYPE = \\010::bytea AND T3308._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3308._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3301._Fld1194 = CAST(0 AS NUMERIC))) T3300
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\365::bytea AND T1._Fld22706_RRRef = T3300.IDRRef
LEFT OUTER JOIN (SELECT
T3310._Marked AS Marked_,
T3310._IDRRef AS IDRRef,
T3310._Fld35059RRef AS Fld35059RRef,
T3310._Fld1194 AS Fld1194_
FROM _Reference34063 T3310
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document538 T3311
ON (T3310._Fld35059RRef = T3311._IDRRef) AND (T3311._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3312
INNER JOIN _Reference79 T3313
ON (T3312._Fld2999 = Справочник.РеестрДанныхЭЛНЗаполняемыхРаботодателемПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3314
WHERE ((T3314._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3314._Fld26433_TYPE = \\010::bytea AND T3314._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3314._Fld26433_RRRef = T3312._IDRRef) AND (T3314._Fld26434RRef = T3313._IDRRef))) AND T3313._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3313._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3311._Fld16982RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3317
WHERE ((T3317._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3317._Fld22973RRef = T3313._IDRRef) AND (T3317._Fld22974_TYPE = \\010::bytea AND T3317._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3317._Fld22974_RRRef = T3311._Fld16982RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3318
WHERE ((T3318._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3318._Fld22980RRef = T3313._IDRRef) AND T3318._Fld22981_TYPE = CASE WHEN T3311._Fld16982RRef IS NOT NULL THEN \\010::bytea END AND T3318._Fld22981_RTRef = CASE WHEN T3311._Fld16982RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3318._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END)))))) AND (T3310._Fld1194 = CAST(0 AS NUMERIC))) T3309
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\017::bytea AND T1._Fld22706_RRRef = T3309.IDRRef
LEFT OUTER JOIN _Reference360 T3319
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001h::bytea AND T1._Fld22706_RRRef = T3319._IDRRef) AND (T3319._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3321._Marked AS Marked_,
T3321._IDRRef AS IDRRef,
T3321._Fld34223RRef AS Fld34223RRef,
T3321._Fld1194 AS Fld1194_
FROM _Reference34041 T3321
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document384 T3322
ON (T3321._Fld34223RRef = T3322._IDRRef) AND (T3322._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3323
INNER JOIN _Reference79 T3324
ON (T3323._Fld2999 = Справочник.БольничныйЛистПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3325
WHERE ((T3325._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3325._Fld26433_TYPE = \\010::bytea AND T3325._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3325._Fld26433_RRRef = T3323._IDRRef) AND (T3325._Fld26434RRef = T3324._IDRRef))) AND T3324._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3324._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3322._Fld9592RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3328
WHERE ((T3328._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3328._Fld22973RRef = T3324._IDRRef) AND (T3328._Fld22974_TYPE = \\010::bytea AND T3328._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3328._Fld22974_RRRef = T3322._Fld9592RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3329
WHERE ((T3329._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3329._Fld22980RRef = T3324._IDRRef) AND T3329._Fld22981_TYPE = CASE WHEN T3322._Fld9592RRef IS NOT NULL THEN \\010::bytea END AND T3329._Fld22981_RTRef = CASE WHEN T3322._Fld9592RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3329._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T3322._Fld9593RRef IS NOT NULL))))))) AND (T3321._Fld1194 = CAST(0 AS NUMERIC))) T3320
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\371::bytea AND T1._Fld22706_RRRef = T3320.IDRRef
LEFT OUTER JOIN (SELECT
T3331._Marked AS Marked_,
T3331._IDRRef AS IDRRef,
T3331._Fld34147RRef AS Fld34147RRef,
T3331._Fld1194 AS Fld1194_
FROM _Reference34039 T3331
WHERE ((EXISTS(SELECT
1
FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
LEFT OUTER JOIN _Document370 T3332
ON (T3331._Fld34147RRef = T3332._IDRRef) AND (T3332._Fld1194 = CAST(0 AS NUMERIC))
WHERE EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3333
INNER JOIN _Reference79 T3334
ON (T3333._Fld2999 = Справочник.АвансовыйПлатежИностранцаПоНДФЛПрисоединенныеФайлы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3335
WHERE ((T3335._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3335._Fld26433_TYPE = \\010::bytea AND T3335._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3335._Fld26433_RRRef = T3333._IDRRef) AND (T3335._Fld26434RRef = T3334._IDRRef))) AND T3334._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3334._Fld1194 = CAST(0 AS NUMERIC))) AND (((T3332._Fld9039RRef IS NOT NULL)) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3338
WHERE ((T3338._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3338._Fld22973RRef = T3334._IDRRef) AND (T3338._Fld22974_TYPE = \\010::bytea AND T3338._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3338._Fld22974_RRRef = T3332._Fld9039RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3339
WHERE ((T3339._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3339._Fld22980RRef = T3334._IDRRef) AND T3339._Fld22981_TYPE = CASE WHEN T3332._Fld9039RRef IS NOT NULL THEN \\010::bytea END AND T3339._Fld22981_RTRef = CASE WHEN T3332._Fld9039RRef IS NOT NULL THEN \\000\\000\\000\\237::bytea END AND (T3339._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND ((T3332._Fld9040RRef IS NOT NULL))))))) AND (T3331._Fld1194 = CAST(0 AS NUMERIC))) T3330
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\367::bytea AND T1._Fld22706_RRRef = T3330.IDRRef
LEFT OUTER JOIN _Reference62 T3340
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000>::bytea AND T1._Fld22706_RRRef = T3340._IDRRef) AND (T3340._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference39481 T3341
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\2329::bytea AND T1._Fld22706_RRRef = T3341._IDRRef) AND (T3341._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN _Reference64 T3342
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000@::bytea AND T1._Fld22706_RRRef = T3342._IDRRef) AND (T3342._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3344._Marked AS Marked_,
T3344._IDRRef AS IDRRef,
T3344._Fld44069RRef AS Fld44069RRef,
T3344._Fld1194 AS Fld1194_
FROM _Document44054 T3344
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3345
INNER JOIN _Reference79 T3346
ON (T3345._Fld2999 = Документ.ИзменениеУсловийАренды::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3347
WHERE ((T3347._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3347._Fld26433_TYPE = \\010::bytea AND T3347._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3347._Fld26433_RRRef = T3345._IDRRef) AND (T3347._Fld26434RRef = T3346._IDRRef))) AND T3346._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3346._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3350
WHERE ((T3350._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3350._Fld22973RRef = T3346._IDRRef) AND (T3350._Fld22974_TYPE = \\010::bytea AND T3350._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3350._Fld22974_RRRef = T3344._Fld44069RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3351
WHERE ((T3351._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3351._Fld22980RRef = T3346._IDRRef) AND T3351._Fld22981_TYPE = \\010::bytea AND T3351._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3351._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND (T3344._Fld1194 = CAST(0 AS NUMERIC))) T3343
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\254\\026::bytea AND T1._Fld22706_RRRef = T3343.IDRRef
LEFT OUTER JOIN _Reference220 T3352
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\334::bytea AND T1._Fld22706_RRRef = T3352._IDRRef
LEFT OUTER JOIN _Reference42833 T3353
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\247Q::bytea AND T1._Fld22706_RRRef = T3353._IDRRef) AND (T3353._Fld1194 = CAST(0 AS NUMERIC))
LEFT OUTER JOIN (SELECT
T3355._Marked AS Marked_,
T3355._IDRRef AS IDRRef,
T3355._Fld18822RRef AS Fld18822RRef,
T3355._Fld18821RRef AS Fld18821RRef,
T3355._Fld1194 AS Fld1194_
FROM _Document575 T3355
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3356
INNER JOIN _Reference79 T3357
ON (T3356._Fld2999 = Документ.УведомлениеОПравеНаИмущественныйВычетДляНДФЛ::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3358
WHERE ((T3358._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3358._Fld26433_TYPE = \\010::bytea AND T3358._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3358._Fld26433_RRRef = T3356._IDRRef) AND (T3358._Fld26434RRef = T3357._IDRRef))) AND T3357._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3357._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3361
WHERE ((T3361._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3361._Fld22973RRef = T3357._IDRRef) AND (T3361._Fld22974_TYPE = \\010::bytea AND T3361._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3361._Fld22974_RRRef = T3355._Fld18821RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3362
WHERE ((T3362._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3362._Fld22980RRef = T3357._IDRRef) AND T3362._Fld22981_TYPE = \\010::bytea AND T3362._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3362._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END) AND (1=1))))) AND (T3355._Fld1194 = CAST(0 AS NUMERIC))) T3354
ON T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002?::bytea AND T1._Fld22706_RRRef = T3354.IDRRef
LEFT OUTER JOIN _Reference45502 T3363
ON (T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\276::bytea AND T1._Fld22706_RRRef = T3363._IDRRef) AND (T3363._Fld1194 = CAST(0 AS NUMERIC))
WHERE (((T1._Fld1194 = CAST(0 AS NUMERIC))) AND (EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference106 T3364
INNER JOIN _Reference79 T3365
ON (T3364._Fld2999 = РегистрСведений.ЖурналОтчетовСтатусы::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg26432 T3366
WHERE ((T3366._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3366._Fld26433_TYPE = \\010::bytea AND T3366._Fld26433_RTRef = \\000\\000\\000j::bytea AND T3366._Fld26433_RRRef = T3364._IDRRef) AND (T3366._Fld26434RRef = T3365._IDRRef))) AND T3365._IDRRef IN (\\207\\305\\3207E*\\320\\277\\021\\354*\\224\\264S\\364\\304::bytea)
WHERE ((T3365._Fld1194 = CAST(0 AS NUMERIC))) AND ((1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg22972 T3369
WHERE ((T3369._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3369._Fld22973RRef = T3365._IDRRef) AND (T3369._Fld22974_TYPE = \\010::bytea AND T3369._Fld22974_RTRef = \\000\\000\\000\\237::bytea AND T3369._Fld22974_RRRef = T1._Fld22705RRef))) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg22979 T3370
WHERE ((T3370._Fld1194 = CAST(0 AS NUMERIC))) AND ((T3370._Fld22980RRef = T3365._IDRRef) AND T3370._Fld22981_TYPE = \\010::bytea AND T3370._Fld22981_RTRef = \\000\\000\\000\\237::bytea AND (T3370._Fld22982 = FALSE))) THEN TRUE ELSE FALSE END))))) AND ((T1._Fld22722 = FALSE) AND (NOT ((CASE WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\006::bytea THEN T2.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\021::bytea THEN T18._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\351::bytea THEN T19._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\334::bytea THEN T20.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\006::bytea THEN T29._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\034::bytea THEN T30._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002q::bytea THEN T31.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002)::bytea THEN T40.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\216::bytea THEN T49.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\324::bytea THEN T58.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\004::bytea THEN T68._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\377::bytea THEN T69.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002*::bytea THEN T79.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\314::bytea THEN T88.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0029::bytea THEN T98.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\002::bytea THEN T107._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\240::bytea THEN T108.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000z::bytea THEN T124._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002 ::bytea THEN T125.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\272::bytea THEN T135._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255a::bytea THEN T136.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\323::bytea THEN T145._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\201::bytea THEN T146._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\226U::bytea THEN T147.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\363::bytea THEN T156._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\335::bytea THEN T157.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\361::bytea THEN T172.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002-::bytea THEN T181.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\243::bytea THEN T191.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000-::bytea THEN T201._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\202\\355::bytea THEN T202.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0025::bytea THEN T212._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\226T::bytea THEN T213.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\016::bytea THEN T222.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\313::bytea THEN T231.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\202\\362::bytea THEN T240._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\277::bytea THEN T241._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0027::bytea THEN T242._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000n::bytea THEN T243._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261N::bytea THEN T244._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217N::bytea THEN T245._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002+::bytea THEN T246.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\303::bytea THEN T255._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001q::bytea THEN T256.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000<::bytea THEN T265._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000q::bytea THEN T266._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\224::bytea THEN T267.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\011::bytea THEN T276.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002w::bytea THEN T286.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255b::bytea THEN T295.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\006::bytea THEN T304.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\250::bytea THEN T314._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\033::bytea THEN T315.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\301::bytea THEN T325.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002$::bytea THEN T334.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\271::bytea THEN T343._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002x::bytea THEN T344.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\220::bytea THEN T353.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\332::bytea THEN T362.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\003::bytea THEN T371.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001&::bytea THEN T382._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001!::bytea THEN T383._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000)::bytea THEN T384._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001$::bytea THEN T385._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\343::bytea THEN T386._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\342::bytea THEN T387.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\216::bytea THEN T397.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\232::bytea THEN T406.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002A::bytea THEN T415.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\262::bytea THEN T424._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\232<::bytea THEN T425._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\001::bytea THEN T426._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\275::bytea THEN T427._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\012::bytea THEN T428._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0022::bytea THEN T429.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261P::bytea THEN T438._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\222::bytea THEN T439._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\320::bytea THEN T440.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000D::bytea THEN T449.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\254\\027::bytea THEN T459.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002&::bytea THEN T472.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000U::bytea THEN T481.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\217::bytea THEN T491.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000G::bytea THEN T500._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\025::bytea THEN T501.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001l::bytea THEN T510._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000?::bytea THEN T511._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\371::bytea THEN T512._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\020::bytea THEN T513.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261+::bytea THEN T524._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\302::bytea THEN T525._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\371::bytea THEN T526.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\245::bytea THEN T535._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\310::bytea THEN T536._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\225\\226::bytea THEN T537.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001p::bytea THEN T547._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\210::bytea THEN T548.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\342::bytea THEN T557._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\356::bytea THEN T558.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\247R::bytea THEN T567._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0024::bytea THEN T568.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000p::bytea THEN T577._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\252::bytea THEN T578._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002>::bytea THEN T579.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\257\\263::bytea THEN T588.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\266::bytea THEN T597.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\230::bytea THEN T607.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000K::bytea THEN T616._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217T::bytea THEN T617._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\030::bytea THEN T618._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002v::bytea THEN T619._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\254\\030::bytea THEN T620._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\321::bytea THEN T621._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\241::bytea THEN T622._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\012::bytea THEN T623.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\227::bytea THEN T634.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\015::bytea THEN T643.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\370::bytea THEN T653._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\013::bytea THEN T654.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\257::bytea THEN T663.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\025::bytea THEN T672.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\004::bytea THEN T683.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\330::bytea THEN T692._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\226::bytea THEN T693.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\302::bytea THEN T703.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\235\\254::bytea THEN T712._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\023::bytea THEN T713.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\273::bytea THEN T724._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\353::bytea THEN T725.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\307::bytea THEN T735._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\333::bytea THEN T736._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\306::bytea THEN T737.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\311::bytea THEN T747.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\217::bytea THEN T758._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255_::bytea THEN T759._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\247O::bytea THEN T760._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001*::bytea THEN T761._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000c::bytea THEN T762.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0008::bytea THEN T773.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\350::bytea THEN T782._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262%::bytea THEN T783._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000T::bytea THEN T784._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\202::bytea THEN T785._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\235\\262::bytea THEN T786.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000V::bytea THEN T795._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000a::bytea THEN T796._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\017::bytea THEN T797.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\347::bytea THEN T806.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\374::bytea THEN T815.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001#::bytea THEN T826._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002u::bytea THEN T827._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001~::bytea THEN T828.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\345::bytea THEN T837._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000H::bytea THEN T838._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000L::bytea THEN T839._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000f::bytea THEN T840.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\020::bytea THEN T851._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\232::bytea THEN T852._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002%::bytea THEN T853.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\311::bytea THEN T863.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002p::bytea THEN T872._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\016::bytea THEN T873._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\011::bytea THEN T874.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002P::bytea THEN T884._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\354::bytea THEN T885._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\004::bytea THEN T886.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000P::bytea THEN T897._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\013::bytea THEN T898.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\336::bytea THEN T907.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\345::bytea THEN T916.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\022::bytea THEN T926._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\177::bytea THEN T927._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0021::bytea THEN T928.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\273::bytea THEN T937._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\347::bytea THEN T938.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\012::bytea THEN T948._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0028::bytea THEN T949._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\224::bytea THEN T950._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\266::bytea THEN T951._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000{::bytea THEN T952.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\233)::bytea THEN T961._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\007::bytea THEN T962.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\365::bytea THEN T973._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0009::bytea THEN T974._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\024::bytea THEN T975._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\373::bytea THEN T976.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\275::bytea THEN T986._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000o::bytea THEN T987._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\215::bytea THEN T988._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\316::bytea THEN T989.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000xd::bytea THEN T999._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\370::bytea THEN T1000.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261M::bytea THEN T1010._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\274::bytea THEN T1011.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\343::bytea THEN T1020.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\344::bytea THEN T1030._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\225::bytea THEN T1031._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\341::bytea THEN T1032._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\355::bytea THEN T1033.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\351::bytea THEN T1042._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261R::bytea THEN T1043._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\256::bytea THEN T1044._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\350::bytea THEN T1045.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\246::bytea THEN T1055.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\352::bytea THEN T1065.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001|::bytea THEN T1075._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000;::bytea THEN T1076._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\261::bytea THEN T1077._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\001::bytea THEN T1078.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\005::bytea THEN T1087._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001+::bytea THEN T1088._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\315::bytea THEN T1089.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001{::bytea THEN T1099.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000i::bytea THEN T1108.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002o::bytea THEN T1116.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\213::bytea THEN T1125._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\035::bytea THEN T1126._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\271::bytea THEN T1127.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001s::bytea THEN T1136.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262\\012::bytea THEN T1147.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\232:::bytea THEN T1156.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\244::bytea THEN T1163._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\357::bytea THEN T1164._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\207::bytea THEN T1165._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001e::bytea THEN T1166._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001(::bytea THEN T1167._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\265::bytea THEN T1168._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\360::bytea THEN T1169._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\005::bytea THEN T1170.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001%::bytea THEN T1180._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\005::bytea THEN T1181.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\377::bytea THEN T1190._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\312::bytea THEN T1191.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\300::bytea THEN T1200.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\325::bytea THEN T1209.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000s::bytea THEN T1218._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\006::bytea THEN T1219.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000]::bytea THEN T1228._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261u::bytea THEN T1229._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\245::bytea THEN T1230.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261k::bytea THEN T1240._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\342::bytea THEN T1241._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\310::bytea THEN T1242.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\362::bytea THEN T1251.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\226::bytea THEN T1260._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002:::bytea THEN T1261.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\203::bytea THEN T1270._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002#::bytea THEN T1271.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\336::bytea THEN T1280.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\335::bytea THEN T1295.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\015::bytea THEN T1304._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\220::bytea THEN T1305._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\303::bytea THEN T1306.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\014::bytea THEN T1315._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261|::bytea THEN T1316._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\377::bytea THEN T1317.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\366::bytea THEN T1327.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\351::bytea THEN T1336._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\211::bytea THEN T1337._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\015::bytea THEN T1338.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000W::bytea THEN T1347._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\343::bytea THEN T1348._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261g::bytea THEN T1349._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000y::bytea THEN T1350._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\000::bytea THEN T1351.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\357::bytea THEN T1361.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\344::bytea THEN T1370.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\212::bytea THEN T1380.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\345::bytea THEN T1389.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\322::bytea THEN T1399._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262#::bytea THEN T1400._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\317::bytea THEN T1401.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001v::bytea THEN T1412.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000.::bytea THEN T1423._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001t::bytea THEN T1424.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0020::bytea THEN T1435.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000k::bytea THEN T1446._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\363::bytea THEN T1447.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\221::bytea THEN T1456.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\273::bytea THEN T1465.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\346::bytea THEN T1474.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\332::bytea THEN T1484._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002<::bytea THEN T1485.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\227::bytea THEN T1494._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000s*::bytea THEN T1495._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000h::bytea THEN T1496.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\226S::bytea THEN T1504._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\313::bytea THEN T1505.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\323::bytea THEN T1514.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217S::bytea THEN T1523._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\340::bytea THEN T1524._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\261::bytea THEN T1525.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\257\\262::bytea THEN T1534._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001 ::bytea THEN T1535._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\362::bytea THEN T1536._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\317::bytea THEN T1537.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\265::bytea THEN T1546._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002h::bytea THEN T1547._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\034::bytea THEN T1548.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000_::bytea THEN T1558._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000,::bytea THEN T1559.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\300::bytea THEN T1574._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0026::bytea THEN T1575.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\022::bytea THEN T1584.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\256::bytea THEN T1594._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\365::bytea THEN T1595._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\033::bytea THEN T1596._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\357::bytea THEN T1597._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\275::bytea THEN T1598.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\265::bytea THEN T1607.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002/::bytea THEN T1616._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000S::bytea THEN T1617._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\276::bytea THEN T1618._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000J::bytea THEN T1619._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002.::bytea THEN T1620.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\371::bytea THEN T1630.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\023::bytea THEN T1639._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\310::bytea THEN T1640._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000=::bytea THEN T1641._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001i::bytea THEN T1642._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\202::bytea THEN T1643.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\200::bytea THEN T1653.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\177::bytea THEN T1662._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\330::bytea THEN T1663.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002::bytea THEN T1672.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\263::bytea THEN T1681._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262\\034::bytea THEN T1682._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\305::bytea THEN T1683._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001::bytea THEN T1684._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\331::bytea THEN T1685.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\373::bytea THEN T1694.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\360::bytea THEN T1703.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\251::bytea THEN T1712.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\350::bytea THEN T1722._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001}::bytea THEN T1723.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\260::bytea THEN T1733._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000}::bytea THEN T1734._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000+::bytea THEN T1735._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\315::bytea THEN T1736.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\202::bytea THEN T1751._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261B::bytea THEN T1752._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\224\\300::bytea THEN T1753.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\322::bytea THEN T1763.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\375::bytea THEN T1772.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000l::bytea THEN T1783._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\372::bytea THEN T1784._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\241\\022::bytea THEN T1785._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\231\\310::bytea THEN T1786.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\355::bytea THEN T1795._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0023::bytea THEN T1796.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\220::bytea THEN T1805._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\201::bytea THEN T1806.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\233%::bytea THEN T1815._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\014::bytea THEN T1816._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\274::bytea THEN T1817._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\254::bytea THEN T1818.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\223::bytea THEN T1827.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\243::bytea THEN T1836._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\267::bytea THEN T1837.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002H::bytea THEN T1846._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001w::bytea THEN T1847.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000`::bytea THEN T1858._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\360::bytea THEN T1859.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\255::bytea THEN T1868._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000t>::bytea THEN T1869._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\346::bytea THEN T1870._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\321::bytea THEN T1871._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0001::bytea THEN T1872.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001U::bytea THEN T1883._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\357::bytea THEN T1884.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\340::bytea THEN T1893._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\333::bytea THEN T1894.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\223::bytea THEN T1903._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000E::bytea THEN T1904._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000u\\237::bytea THEN T1905.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\223::bytea THEN T1914._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\364::bytea THEN T1915._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\277::bytea THEN T1916.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000Y::bytea THEN T1925._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\370::bytea THEN T1926.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\373::bytea THEN T1937._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\031::bytea THEN T1938.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\367::bytea THEN T1947.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\374::bytea THEN T1957.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\211::bytea THEN T1967.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261 ::bytea THEN T1976._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\000::bytea THEN T1977.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\341::bytea THEN T1986.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\231::bytea THEN T1996._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\014::bytea THEN T1997.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\036::bytea THEN T2006._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\345::bytea THEN T2007._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\376::bytea THEN T2008._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0007::bytea THEN T2009._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\020::bytea THEN T2010.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\271::bytea THEN T2019._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\003::bytea THEN T2020.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\257::bytea THEN T2029._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\304::bytea THEN T2030.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261U::bytea THEN T2040._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\301::bytea THEN T2041._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\231\\311::bytea THEN T2042._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000u::bytea THEN T2043._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\267::bytea THEN T2044._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\214::bytea THEN T2045._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000d::bytea THEN T2046.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261q::bytea THEN T2057._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\214::bytea THEN T2058.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\312::bytea THEN T2067.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\001::bytea THEN T2078.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\235\\256::bytea THEN T2088._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\331::bytea THEN T2089._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\230::bytea THEN T2090._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002;::bytea THEN T2091.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\347::bytea THEN T2100._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002B::bytea THEN T2101.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\375::bytea THEN T2110.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\274::bytea THEN T2119.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\342::bytea THEN T2128._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\222::bytea THEN T2129.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\234::bytea THEN T2138.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\250::bytea THEN T2147.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\354::bytea THEN T2156._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001y::bytea THEN T2157.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\024::bytea THEN T2168.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\010::bytea THEN T2177.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0005::bytea THEN T2186._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000~::bytea THEN T2187._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000b::bytea THEN T2188.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\316::bytea THEN T2197.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\037::bytea THEN T2206.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261v::bytea THEN T2215._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261-::bytea THEN T2216._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000g::bytea THEN T2217._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\256::bytea THEN T2218.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\032::bytea THEN T2227.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\355::bytea THEN T2236._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\247::bytea THEN T2237._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\203::bytea THEN T2238.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\014::bytea THEN T2248.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000r::bytea THEN T2259._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\017::bytea THEN T2260._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000xc::bytea THEN T2261._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\351::bytea THEN T2262.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\356::bytea THEN T2272.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\027::bytea THEN T2281.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\200::bytea THEN T2290._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002s::bytea THEN T2291.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\202\\360::bytea THEN T2300._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002""::bytea THEN T2301.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\253::bytea THEN T2311.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000[::bytea THEN T2320.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\212~::bytea THEN T2327._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\304::bytea THEN T2328._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\316::bytea THEN T2329.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\030::bytea THEN T2340.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261=::bytea THEN T2349._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0000::bytea THEN T2350.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\241\\021::bytea THEN T2361._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\023::bytea THEN T2362.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261*::bytea THEN T2371._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\360L::bytea THEN T2372._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\376::bytea THEN T2373.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002r::bytea THEN T2382.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\034::bytea THEN T2391._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000x::bytea THEN T2392._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000(::bytea THEN T2393._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000t::bytea THEN T2394._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\314::bytea THEN T2395.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\276::bytea THEN T2404.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\354::bytea THEN T2413._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002U::bytea THEN T2414._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\233::bytea THEN T2415.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\022::bytea THEN T2424.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\320::bytea THEN T2433._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\213::bytea THEN T2434.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\246::bytea THEN T2443.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000/::bytea THEN T2452._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\247P::bytea THEN T2453._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\357::bytea THEN T2454.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000Q::bytea THEN T2463._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\362::bytea THEN T2464._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\261::bytea THEN T2465._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\263::bytea THEN T2466.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\027::bytea THEN T2475.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\225::bytea THEN T2484.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001j::bytea THEN T2494._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\350::bytea THEN T2495._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000:::bytea THEN T2496._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\026::bytea THEN T2497._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217Q::bytea THEN T2498.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\027::bytea THEN T2507._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\315::bytea THEN T2508.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\321::bytea THEN T2517._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001r::bytea THEN T2518.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000*::bytea THEN T2527._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261o::bytea THEN T2528._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\026::bytea THEN T2529.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000I::bytea THEN T2538._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\011::bytea THEN T2539._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002t::bytea THEN T2540.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\326::bytea THEN T2549.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001""::bytea THEN T2558._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\032::bytea THEN T2559._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000C::bytea THEN T2560._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\021::bytea THEN T2561.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\233*::bytea THEN T2572.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217M::bytea THEN T2582._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261t::bytea THEN T2583._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\003::bytea THEN T2584._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\340::bytea THEN T2585.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\251::bytea THEN T2594._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\330::bytea THEN T2595._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\303::bytea THEN T2596.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\346::bytea THEN T2606.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\337::bytea THEN T2616._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002!::bytea THEN T2617.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\212::bytea THEN T2627._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000s\\345::bytea THEN T2628._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\327::bytea THEN T2629.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000xe::bytea THEN T2638.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\372::bytea THEN T2647.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\237::bytea THEN T2658.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\264::bytea THEN T2672.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261j::bytea THEN T2681._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\266::bytea THEN T2682.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002^::bytea THEN T2691._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\257::bytea THEN T2692._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\242::bytea THEN T2693.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\237\\262::bytea THEN T2703.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\257\\265::bytea THEN T2718.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000F::bytea THEN T2727._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\270::bytea THEN T2728.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\021::bytea THEN T2737.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\235::bytea THEN T2746.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\202\\354::bytea THEN T2755._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0002::bytea THEN T2756._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\005::bytea THEN T2757._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\264::bytea THEN T2758._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\225\\224::bytea THEN T2759._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\025::bytea THEN T2760.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\233#::bytea THEN T2771._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\372::bytea THEN T2772.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000v::bytea THEN T2781._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001u::bytea THEN T2782.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\360::bytea THEN T2793._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\260::bytea THEN T2794.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\262\\022::bytea THEN T2803._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\257\\264::bytea THEN T2804.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\011::bytea THEN T2813.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\313::bytea THEN T2822._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\300::bytea THEN T2823._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\361::bytea THEN T2824.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255c::bytea THEN T2841.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\256\\351::bytea THEN T2850._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\207::bytea THEN T2851.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\344::bytea THEN T2860.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001f::bytea THEN T2870._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002,::bytea THEN T2871.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\305::bytea THEN T2880.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\015::bytea THEN T2889._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\013::bytea THEN T2890.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\206::bytea THEN T2901.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\215::bytea THEN T2910.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\262::bytea THEN T2919._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0010::bytea THEN T2920._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217U::bytea THEN T2921.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000R::bytea THEN T2930._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\376::bytea THEN T2931.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\354::bytea THEN T2942._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\270::bytea THEN T2943._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\\\::bytea THEN T2944._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\024::bytea THEN T2945.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000B::bytea THEN T2955._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\262::bytea THEN T2956.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001o::bytea THEN T2965.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000M::bytea THEN T2979._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\364::bytea THEN T2980.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\221::bytea THEN T2989._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\207::bytea THEN T2990._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\206::bytea THEN T2991._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\247::bytea THEN T2992._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217O::bytea THEN T2993.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\270::bytea THEN T3002._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\363::bytea THEN T3003._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002@::bytea THEN T3004.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001x::bytea THEN T3013.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\370::bytea THEN T3024._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261S::bytea THEN T3025._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\035::bytea THEN T3026.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\232;::bytea THEN T3036._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\356::bytea THEN T3037._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261O::bytea THEN T3038._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\002::bytea THEN T3039.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000u\\236::bytea THEN T3049._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0006::bytea THEN T3050._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001z::bytea THEN T3051.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\247::bytea THEN T3062.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\255::bytea THEN T3071.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\225\\222::bytea THEN T3080.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\235\\261::bytea THEN T3090._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\215\\302::bytea THEN T3091._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000x\\267::bytea THEN T3092._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\337::bytea THEN T3093.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\352::bytea THEN T3102.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\0004::bytea THEN T3112._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\252::bytea THEN T3113.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\224\\277::bytea THEN T3122.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\016::bytea THEN T3133.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\225::bytea THEN T3143._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001-::bytea THEN T3144.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\244::bytea THEN T3153._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\307::bytea THEN T3154.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\353::bytea THEN T3164._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\010::bytea THEN T3165._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\367::bytea THEN T3166._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\225\\225::bytea THEN T3167.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\002::bytea THEN T3176.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217R::bytea THEN T3185._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\222\\007::bytea THEN T3186._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\012::bytea THEN T3187.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\213U::bytea THEN T3196._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\215\\303::bytea THEN T3197._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\204::bytea THEN T3198.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\260\\375::bytea THEN T3208._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\010::bytea THEN T3209.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\031::bytea THEN T3219._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\177\\356::bytea THEN T3220._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002(::bytea THEN T3221.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\236::bytea THEN T3230.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\013::bytea THEN T3240._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\353::bytea THEN T3241.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\217P::bytea THEN T3251._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\255`::bytea THEN T3252.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000j::bytea THEN T3261._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\205::bytea THEN T3262.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002\\036::bytea THEN T3271.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\227\\310::bytea THEN T3280._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\231::bytea THEN T3281.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\026::bytea THEN T3290.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001\\365::bytea THEN T3300.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\205\\017::bytea THEN T3309.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\001h::bytea THEN T3319._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\371::bytea THEN T3320.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\204\\367::bytea THEN T3330.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000>::bytea THEN T3340._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\2329::bytea THEN T3341._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000@::bytea THEN T3342._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\254\\026::bytea THEN T3343.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\000\\334::bytea THEN T3352._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\247Q::bytea THEN T3353._Marked WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\002?::bytea THEN T3354.Marked_ WHEN T1._Fld22706_TYPE = \\010::bytea AND T1._Fld22706_RTRef = \\000\\000\\261\\276::bytea THEN T3363._Marked ELSE CAST(NULL AS BOOLEAN) END) = TRUE)))
ORDER BY (T1._Fld22705RRef), (T1._Fld22706_TYPE), (T1._Fld22706_RTRef), (T1._Fld22706_RRRef) LIMIT 45
Проанализирован программный код указанного участка.
Оказалось, в обработке НалоговыйМониторинг в форме РегламентированнаяОтчетность есть динамический список, источником которого является произвольный запрос, извлекающий данные из регистра ЖурналОтчетовСтатусы с условием "Ссылка.ПометкаУдаления = ЛОЖЬ".
В регистре ЖурналОтчетовСтатусы у поля Ссылка тип произвольный (ДокументСсылка, СправочникСсылка), в результате образуется множество левых соединений с разными таблицами.
Выходит, низкая производительность является ошибкой типовой конфигурации, конкретно данного релиза, и возможно, будет устранена в будущих обновлениях; но все же странно, что такая грубая ошибка была допущена, тем более в регистре уже есть реквизит ПометкаУдаления и его данные совпадают со значениями в документах и справочниках из Ссылки.
Правка оказалось простой: в условии вместо "РегистрСведенийЖурналОтчетовСтатусы .Ссылка.ПометкаУдаления = ЛОЖЬ" заменено на "РегистрСведенийЖурналОтчетовСтатусы.ПометкаУдаления = ЛОЖЬ".
Результат
В результате изменения запроса динамического списка база под пользователем 1 теперь запускается в течение 15 секунд.
Во вложении скрипты для вывода указанных топовых вызовов с помощью GitBash.