Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Task #948426

closed

Улучшена поддержка диалекта Postgre SQL

Added by Сергей Старых about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Консоль запросов
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Теперь разбирается такой запрос

SELECT
T1.Q_001_F_000TRef,
T1.Q_001_F_000RRef,
CAST(T1.Q_001_F_001_ AS MVARCHAR(29)),
T1.Q_001_F_002RRef,
T1.Q_001_F_003RRef,
T1.Q_001_F_004_,
T1.Q_001_F_005_TYPE,
T1.Q_001_F_005_RTRef,
T1.Q_001_F_005_RRRef,
T1.Q_001_F_006_,
CASE WHEN T1.Q_001_F_007_TYPE = '\\010'::bytea AND T1.Q_001_F_007_RTRef = '\\000\\000\\000\\210'::bytea THEN T1.Q_001_F_007_RRRef END,
CAST(T1.Q_001_F_008_ AS MVARCHAR(44)),
T1.Q_001_F_009_,
T1.Q_001_F_010RRef,
T1.Q_001_F_011_,
T1.Q_001_F_012RRef,
T1.Q_001_F_013_TYPE,
T1.Q_001_F_013_S,
T1.Q_001_F_013_RRRef,
T1.Q_001_F_014_,
T1.Q_001_F_015_,
'\\005'::bytea,
T1.Q_001_F_016_,
'\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea,
T1.Q_001_F_017_,
T1.Q_001_F_018_
FROM (SELECT DISTINCT
T2.RecorderTRef AS Q_001_F_000TRef,
T2.RecorderRRef AS Q_001_F_000RRef,
'торо_ПланГрафикРемонта'::mvarchar AS Q_001_F_001_,
T2.Fld4107RRef AS Q_001_F_002RRef,
T2.Fld4106RRef AS Q_001_F_003RRef,
CASE WHEN (COALESCE(T9.Period_,'0001-01-01 00:00:00'::timestamp) > T2.Period_) THEN T9.Fld3700_ ELSE T2.Fld4110_ END AS Q_001_F_004_,
T2.Fld4112_TYPE AS Q_001_F_005_TYPE,
T2.Fld4112_RTRef AS Q_001_F_005_RTRef,
T2.Fld4112_RRRef AS Q_001_F_005_RRRef,
CASE WHEN (COALESCE(T9.Period_,'0001-01-01 00:00:00'::timestamp) > T2.Period_) THEN T9.Fld3701_ ELSE T2.Fld4111_ END AS Q_001_F_006_,
CAST(NULL AS BYTEA) AS Q_001_F_007_TYPE,
CAST(NULL AS BOOLEAN) AS Q_001_F_007_L,
CAST(NULL AS NUMERIC) AS Q_001_F_007_N,
CAST(NULL AS TIMESTAMP) AS Q_001_F_007_T,
CAST(NULL AS MVARCHAR(1)) AS Q_001_F_007_S,
CAST(NULL AS BYTEA) AS Q_001_F_007_B,
CAST(NULL AS BYTEA) AS Q_001_F_007_RTRef,
CAST(NULL AS BYTEA) AS Q_001_F_007_RRRef,
CASE WHEN (NOT (((T8._Fld3646 IS NULL)))) THEN 'Выполнен (план-график ППР)'::mvarchar WHEN (NOT (((T16.Fld3848_ IS NULL) AND (T22.Fld3527_ IS NULL)))) THEN 'Выполняется (план-график ППР)'::mvarchar WHEN (NOT (((T9.Fld3698_ IS NULL)))) THEN 'Запланировано выполнение (план-график ППР)'::mvarchar ELSE 'Введен ППР (план-график ППР)'::mvarchar END AS Q_001_F_008_,
T2.Fld4104_ AS Q_001_F_009_,
T2.Fld4108RRef AS Q_001_F_010RRef,
CASE WHEN (T9.RecorderTRef IS NULL AND T9.RecorderRRef IS NULL) THEN FALSE ELSE TRUE END AS Q_001_F_011_,
T34._Fld6621RRef AS Q_001_F_012RRef,
CASE WHEN (T28.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN '\\005'::bytea ELSE CASE WHEN T28.Fld4350RRef IS NOT NULL THEN '\\010'::bytea END END AS Q_001_F_013_TYPE,
CASE WHEN (T28.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN 'Не установлено'::mvarchar ELSE CASE WHEN T28.Fld4350RRef IS NOT NULL THEN ''::mvarchar END END AS Q_001_F_013_S,
CASE WHEN (T28.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea ELSE T28.Fld4350RRef END AS Q_001_F_013_RRRef,
CASE WHEN (T8._Fld3646 IS NULL) THEN FALSE ELSE TRUE END AS Q_001_F_014_,
FALSE AS Q_001_F_015_,
'Статус не определен'::mvarchar AS Q_001_F_016_,
T35.Fld3962_ AS Q_001_F_017_,
COALESCE(CASE WHEN (COALESCE(T9.Period_,'0001-01-01 00:00:00'::timestamp) > T2.Period_) THEN T9.Fld3700_ ELSE T2.Fld4110_ END,'0001-01-01 00:00:00'::timestamp) AS Q_001_F_018_
FROM (SELECT
T7._Fld4103RRef AS Fld4103RRef,
T7._Fld4112_TYPE AS Fld4112_TYPE,
T7._Fld4112_RTRef AS Fld4112_RTRef,
T7._Fld4112_RRRef AS Fld4112_RRRef,
T7._Fld4114 AS Fld4114_,
T7._Fld4116 AS Fld4116_,
T7._Fld4110 AS Fld4110_,
T7._Fld4104 AS Fld4104_,
T7._Fld4107RRef AS Fld4107RRef,
T7._RecorderTRef AS RecorderTRef,
T7._RecorderRRef AS RecorderRRef,
T7._Fld4106RRef AS Fld4106RRef,
T7._Period AS Period_,
T7._Fld4111 AS Fld4111_,
T7._Fld4108RRef AS Fld4108RRef
FROM (SELECT
T4.Fld4103RRef AS Fld4103RRef,
T4.Fld4104_ AS Fld4104_,
T4.Fld4105RRef AS Fld4105RRef,
T4.Fld4106RRef AS Fld4106RRef,
T4.Fld4107RRef AS Fld4107RRef,
T4.Fld4108RRef AS Fld4108RRef,
T4.Fld4109_ AS Fld4109_,
T4.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T6._RecorderTRef || T6._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T6._RecorderTRef || T6._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T5._Fld4103RRef AS Fld4103RRef,
T5._Fld4104 AS Fld4104_,
T5._Fld4105RRef AS Fld4105RRef,
T5._Fld4106RRef AS Fld4106RRef,
T5._Fld4107RRef AS Fld4107RRef,
T5._Fld4108RRef AS Fld4108RRef,
T5._Fld4109 AS Fld4109_,
MAX(T5._Period) AS MAXPERIOD_
FROM _InfoRg4102 T5
WHERE T5._Active = TRUE AND ((T5._Fld4103RRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351:\\031\\031\\274\\340'::bytea))
GROUP BY T5._Fld4103RRef,
T5._Fld4104,
T5._Fld4105RRef,
T5._Fld4106RRef,
T5._Fld4107RRef,
T5._Fld4108RRef,
T5._Fld4109) T4
INNER JOIN _InfoRg4102 T6
ON T4.Fld4103RRef = T6._Fld4103RRef AND T4.Fld4104_ = T6._Fld4104 AND T4.Fld4105RRef = T6._Fld4105RRef AND T4.Fld4106RRef = T6._Fld4106RRef AND T4.Fld4107RRef = T6._Fld4107RRef AND T4.Fld4108RRef = T6._Fld4108RRef AND T4.Fld4109_ = T6._Fld4109 AND T4.MAXPERIOD_ = T6._Period
WHERE T6._Active = TRUE AND ((T6._Fld4103RRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351:\\031\\031\\274\\340'::bytea))
GROUP BY T4.Fld4103RRef,
T4.Fld4104_,
T4.Fld4105RRef,
T4.Fld4106RRef,
T4.Fld4107RRef,
T4.Fld4108RRef,
T4.Fld4109_,
T4.MAXPERIOD_) T3
INNER JOIN _InfoRg4102 T7
ON T3.Fld4103RRef = T7._Fld4103RRef AND T3.Fld4104_ = T7._Fld4104 AND T3.Fld4105RRef = T7._Fld4105RRef AND T3.Fld4106RRef = T7._Fld4106RRef AND T3.Fld4107RRef = T7._Fld4107RRef AND T3.Fld4108RRef = T7._Fld4108RRef AND T3.Fld4109_ = T7._Fld4109 AND T3.MAXPERIOD_ = T7._Period AND T3.MAXRECORDERTRef = T7._RecorderTRef AND T3.MAXRECORDERRRef = T7._RecorderRRef) T2
LEFT OUTER JOIN _InfoRg3643 T8
ON (T2.Fld4104_ = T8._Fld3646)
LEFT OUTER JOIN (SELECT
T14._Fld3698 AS Fld3698_,
T14._Fld3702 AS Fld3702_,
T14._RecorderTRef AS RecorderTRef,
T14._RecorderRRef AS RecorderRRef,
T14._Period AS Period_,
T14._Fld3700 AS Fld3700_,
T14._Fld3701 AS Fld3701_
FROM (SELECT
T11.Fld3698_ AS Fld3698_,
T11.Fld3699_ AS Fld3699_,
T11.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T13._RecorderTRef || T13._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T13._RecorderTRef || T13._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T12._Fld3698 AS Fld3698_,
T12._Fld3699 AS Fld3699_,
MAX(T12._Period) AS MAXPERIOD_
FROM _InfoRg3697 T12
WHERE T12._Active = TRUE
GROUP BY T12._Fld3698,
T12._Fld3699) T11
INNER JOIN _InfoRg3697 T13
ON T11.Fld3698_ = T13._Fld3698 AND T11.Fld3699_ = T13._Fld3699 AND T11.MAXPERIOD_ = T13._Period
WHERE T13._Active = TRUE
GROUP BY T11.Fld3698_,
T11.Fld3699_,
T11.MAXPERIOD_) T10
INNER JOIN _InfoRg3697 T14
ON T10.Fld3698_ = T14._Fld3698 AND T10.Fld3699_ = T14._Fld3699 AND T10.MAXPERIOD_ = T14._Period AND T10.MAXRECORDERTRef = T14._RecorderTRef AND T10.MAXRECORDERRRef = T14._RecorderRRef) T9
ON (T2.Fld4104_ = T9.Fld3698_) AND (T9.Fld3702_ = FALSE) AND (NOT ((T9.RecorderTRef = '\\000\\000\\000\\311'::bytea AND T9.RecorderRRef IN
(SELECT
T15._Fld3967RRef AS Q_002_F_000RRef
FROM _InfoRg3966 T15))))
LEFT OUTER JOIN (SELECT
T21._Fld3848 AS Fld3848_
FROM (SELECT
T18.Fld3848_ AS Fld3848_,
T18.MAXPERIOD_ AS MAXPERIOD_,
MAX(T20._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T19._Fld3848 AS Fld3848_,
MAX(T19._Period) AS MAXPERIOD_
FROM _InfoRg3847 T19
WHERE T19._Active = TRUE
GROUP BY T19._Fld3848) T18
INNER JOIN _InfoRg3847 T20
ON T18.Fld3848_ = T20._Fld3848 AND T18.MAXPERIOD_ = T20._Period
WHERE T20._Active = TRUE
GROUP BY T18.Fld3848_,
T18.MAXPERIOD_) T17
INNER JOIN _InfoRg3847 T21
ON T17.Fld3848_ = T21._Fld3848 AND T17.MAXPERIOD_ = T21._Period AND T17.MAXRECORDERRRef = T21._RecorderRRef) T16
ON (T2.Fld4104_ = T16.Fld3848_)
LEFT OUTER JOIN (SELECT
T27._Fld3527 AS Fld3527_
FROM (SELECT
T24.Fld3527_ AS Fld3527_,
T24.MAXPERIOD_ AS MAXPERIOD_,
MAX(T26._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T25._Fld3527 AS Fld3527_,
MAX(T25._Period) AS MAXPERIOD_
FROM _InfoRg3526 T25
WHERE T25._Active = TRUE
GROUP BY T25._Fld3527) T24
INNER JOIN _InfoRg3526 T26
ON T24.Fld3527_ = T26._Fld3527 AND T24.MAXPERIOD_ = T26._Period
WHERE T26._Active = TRUE
GROUP BY T24.Fld3527_,
T24.MAXPERIOD_) T23
INNER JOIN _InfoRg3526 T27
ON T23.Fld3527_ = T27._Fld3527 AND T23.MAXPERIOD_ = T27._Period AND T23.MAXRECORDERRRef = T27._RecorderRRef) T22
ON (T2.Fld4104_ = T22.Fld3527_)
LEFT OUTER JOIN (SELECT
T33._Fld4349RRef AS Fld4349RRef,
T33._Fld4350RRef AS Fld4350RRef
FROM (SELECT
T30.Fld4349RRef AS Fld4349RRef,
T30.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T32._RecorderTRef || T32._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T32._RecorderTRef || T32._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T31._Fld4349RRef AS Fld4349RRef,
MAX(T31._Period) AS MAXPERIOD_
FROM _InfoRg4348 T31
WHERE T31._Period <= '2022-08-11 15:52:36'::timestamp AND T31._Active = TRUE
GROUP BY T31._Fld4349RRef) T30
INNER JOIN _InfoRg4348 T32
ON T30.Fld4349RRef = T32._Fld4349RRef AND T30.MAXPERIOD_ = T32._Period
WHERE T32._Active = TRUE
GROUP BY T30.Fld4349RRef,
T30.MAXPERIOD_) T29
INNER JOIN _InfoRg4348 T33
ON T29.Fld4349RRef = T33._Fld4349RRef AND T29.MAXPERIOD_ = T33._Period AND T29.MAXRECORDERTRef = T33._RecorderTRef AND T29.MAXRECORDERRRef = T33._RecorderRRef) T28
ON (T2.Fld4107RRef = T28.Fld4349RRef)
INNER JOIN _Reference143 T34
ON (T2.Fld4107RRef = T34._IDRRef)
LEFT OUTER JOIN (SELECT
T40._Fld3965 AS Fld3965_,
T40._Fld3963 AS Fld3963_,
T40._Fld3962 AS Fld3962_
FROM (SELECT
T37.Fld3962_ AS Fld3962_,
T37.Fld3963_ AS Fld3963_,
T37.Fld3964_ AS Fld3964_,
T37.MAXPERIOD_ AS MAXPERIOD_,
MAX(T39._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T38._Fld3962 AS Fld3962_,
T38._Fld3963 AS Fld3963_,
T38._Fld3964 AS Fld3964_,
MAX(T38._Period) AS MAXPERIOD_
FROM _InfoRg3961 T38
WHERE T38._Active = TRUE
GROUP BY T38._Fld3962,
T38._Fld3963,
T38._Fld3964) T37
INNER JOIN _InfoRg3961 T39
ON T37.Fld3962_ = T39._Fld3962 AND T37.Fld3963_ = T39._Fld3963 AND T37.Fld3964_ = T39._Fld3964 AND T37.MAXPERIOD_ = T39._Period
WHERE T39._Active = TRUE
GROUP BY T37.Fld3962_,
T37.Fld3963_,
T37.Fld3964_,
T37.MAXPERIOD_) T36
INNER JOIN _InfoRg3961 T40
ON T36.Fld3962_ = T40._Fld3962 AND T36.Fld3963_ = T40._Fld3963 AND T36.Fld3964_ = T40._Fld3964 AND T36.MAXPERIOD_ = T40._Period AND T36.MAXRECORDERRRef = T40._RecorderRRef) T35
ON (T2.Fld4104_ = T35.Fld3963_)
WHERE (T2.Fld4103RRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351:\\031\\031\\274\\340'::bytea) AND (T2.Fld4114_ = FALSE) AND (T2.Fld4116_ = FALSE) AND (T2.Fld4110_ <= '2022-08-21 23:59:59'::timestamp) AND (T8._Fld3646 IS NULL) AND ((T35.Fld3965_ = FALSE) OR (T35.Fld3965_ IS NULL))
ORDER BY 31 LIMIT 1000) T1
UNION ALL SELECT
'\\000\\000\\000\\306'::bytea,
T41.Q_001_F_000RRef,
CAST(T41.Q_001_F_001_ AS MVARCHAR(29)),
T41.Q_001_F_002RRef,
T41.Q_001_F_003RRef,
T41.Q_001_F_004_,
'\\010'::bytea,
'\\000\\000\\000o'::bytea,
T41.Q_001_F_005RRef,
T41.Q_001_F_006_,
T41.Q_001_F_007RRef,
T41.Q_001_F_008_,
T41.Q_001_F_009_,
T41.Q_001_F_010RRef,
T41.Q_001_F_011_,
T41.Q_001_F_012RRef,
T41.Q_001_F_013_TYPE,
T41.Q_001_F_013_S,
T41.Q_001_F_013_RRRef,
T41.Q_001_F_014_,
T41.Q_001_F_015_,
'\\010'::bytea,
''::mvarchar,
T41.Q_001_F_016RRef,
T41.Q_001_F_017_,
T41.Q_001_F_018_
FROM (SELECT DISTINCT
T42._RecorderRRef AS Q_001_F_000RRef,
'торо_ВыявленныеДефекты'::mvarchar AS Q_001_F_001_,
T42._Fld3586RRef AS Q_001_F_002RRef,
'\\201\\024\\000PV\\230\\204\\346\\021\\352\\220R}\\376C/'::bytea AS Q_001_F_003RRef,
CASE WHEN (NOT (((T61.Fld3698_ IS NULL)))) THEN T61.Fld3700_ ELSE T42._Period END AS Q_001_F_004_,
T42._Fld3594RRef AS Q_001_F_005RRef,
CASE WHEN (NOT (((T61.Fld3698_ IS NULL)))) THEN T61.Fld3701_ ELSE CAST(NULL AS TIMESTAMP) END AS Q_001_F_006_,
T42._Fld3593RRef AS Q_001_F_007RRef,
CASE WHEN (NOT (((T74._Fld3646 IS NULL)))) THEN 'Устранен (выявленный дефект)'::mvarchar WHEN (NOT (((T49.Fld3848_ IS NULL) AND (T55.Fld3527_ IS NULL)))) THEN 'Устраняется (выявленный дефект)'::mvarchar WHEN (NOT (((T61.Fld3698_ IS NULL)))) THEN 'Запланировано устранение (выявленный дефект)'::mvarchar ELSE 'Зарегистрирован (выявленный дефект)'::mvarchar END AS Q_001_F_008_,
T42._Fld3587 AS Q_001_F_009_,
T42._Fld3592RRef AS Q_001_F_010RRef,
CASE WHEN (T61.RecorderTRef IS NULL AND T61.RecorderRRef IS NULL) THEN FALSE ELSE TRUE END AS Q_001_F_011_,
T82._Fld6621RRef AS Q_001_F_012RRef,
CASE WHEN (T68.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN '\\005'::bytea ELSE CASE WHEN T68.Fld4350RRef IS NOT NULL THEN '\\010'::bytea END END AS Q_001_F_013_TYPE,
CASE WHEN (T68.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN 'Не установлено'::mvarchar ELSE CASE WHEN T68.Fld4350RRef IS NOT NULL THEN ''::mvarchar END END AS Q_001_F_013_S,
CASE WHEN (T68.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea ELSE T68.Fld4350RRef END AS Q_001_F_013_RRRef,
CASE WHEN (T74._Fld3646 IS NULL) THEN FALSE ELSE TRUE END AS Q_001_F_014_,
T75._Fld4205 AS Q_001_F_015_,
COALESCE(T76.Fld4295RRef,'\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) AS Q_001_F_016RRef,
T83.Fld3962_ AS Q_001_F_017_,
COALESCE(CASE WHEN (NOT (((T61.Fld3698_ IS NULL)))) THEN T61.Fld3700_ ELSE T42._Period END,'0001-01-01 00:00:00'::timestamp) AS Q_001_F_018_
FROM _InfoRg3584 T42
LEFT OUTER JOIN (SELECT
T48._RecorderRRef AS RecorderRRef,
T48._Fld3970 AS Fld3970_
FROM (SELECT
T45.Fld3970_ AS Fld3970_,
T45.MAXPERIOD_ AS MAXPERIOD_,
MAX(T47._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T46._Fld3970 AS Fld3970_,
MAX(T46._Period) AS MAXPERIOD_
FROM _InfoRg3969 T46
WHERE T46._Active = TRUE
GROUP BY T46._Fld3970) T45
INNER JOIN _InfoRg3969 T47
ON T45.Fld3970_ = T47._Fld3970 AND T45.MAXPERIOD_ = T47._Period
WHERE T47._Active = TRUE
GROUP BY T45.Fld3970_,
T45.MAXPERIOD_) T44
INNER JOIN _InfoRg3969 T48
ON T44.Fld3970_ = T48._Fld3970 AND T44.MAXPERIOD_ = T48._Period AND T44.MAXRECORDERRRef = T48._RecorderRRef) T43
ON (T42._Fld3587 = T43.Fld3970_)
LEFT OUTER JOIN (SELECT
T54._Fld3848 AS Fld3848_
FROM (SELECT
T51.Fld3848_ AS Fld3848_,
T51.MAXPERIOD_ AS MAXPERIOD_,
MAX(T53._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T52._Fld3848 AS Fld3848_,
MAX(T52._Period) AS MAXPERIOD_
FROM _InfoRg3847 T52
WHERE T52._Active = TRUE
GROUP BY T52._Fld3848) T51
INNER JOIN _InfoRg3847 T53
ON T51.Fld3848_ = T53._Fld3848 AND T51.MAXPERIOD_ = T53._Period
WHERE T53._Active = TRUE
GROUP BY T51.Fld3848_,
T51.MAXPERIOD_) T50
INNER JOIN _InfoRg3847 T54
ON T50.Fld3848_ = T54._Fld3848 AND T50.MAXPERIOD_ = T54._Period AND T50.MAXRECORDERRRef = T54._RecorderRRef) T49
ON (T42._Fld3587 = T49.Fld3848_)
LEFT OUTER JOIN (SELECT
T60._Fld3527 AS Fld3527_
FROM (SELECT
T57.Fld3527_ AS Fld3527_,
T57.MAXPERIOD_ AS MAXPERIOD_,
MAX(T59._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T58._Fld3527 AS Fld3527_,
MAX(T58._Period) AS MAXPERIOD_
FROM _InfoRg3526 T58
WHERE T58._Active = TRUE
GROUP BY T58._Fld3527) T57
INNER JOIN _InfoRg3526 T59
ON T57.Fld3527_ = T59._Fld3527 AND T57.MAXPERIOD_ = T59._Period
WHERE T59._Active = TRUE
GROUP BY T57.Fld3527_,
T57.MAXPERIOD_) T56
INNER JOIN _InfoRg3526 T60
ON T56.Fld3527_ = T60._Fld3527 AND T56.MAXPERIOD_ = T60._Period AND T56.MAXRECORDERRRef = T60._RecorderRRef) T55
ON (T42._Fld3587 = T55.Fld3527_)
LEFT OUTER JOIN (SELECT
T66._Fld3698 AS Fld3698_,
T66._Fld3702 AS Fld3702_,
T66._RecorderTRef AS RecorderTRef,
T66._RecorderRRef AS RecorderRRef,
T66._Fld3700 AS Fld3700_,
T66._Fld3701 AS Fld3701_
FROM (SELECT
T63.Fld3698_ AS Fld3698_,
T63.Fld3699_ AS Fld3699_,
T63.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T65._RecorderTRef || T65._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T65._RecorderTRef || T65._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T64._Fld3698 AS Fld3698_,
T64._Fld3699 AS Fld3699_,
MAX(T64._Period) AS MAXPERIOD_
FROM _InfoRg3697 T64
WHERE T64._Active = TRUE
GROUP BY T64._Fld3698,
T64._Fld3699) T63
INNER JOIN _InfoRg3697 T65
ON T63.Fld3698_ = T65._Fld3698 AND T63.Fld3699_ = T65._Fld3699 AND T63.MAXPERIOD_ = T65._Period
WHERE T65._Active = TRUE
GROUP BY T63.Fld3698_,
T63.Fld3699_,
T63.MAXPERIOD_) T62
INNER JOIN _InfoRg3697 T66
ON T62.Fld3698_ = T66._Fld3698 AND T62.Fld3699_ = T66._Fld3699 AND T62.MAXPERIOD_ = T66._Period AND T62.MAXRECORDERTRef = T66._RecorderTRef AND T62.MAXRECORDERRRef = T66._RecorderRRef) T61
ON (T42._Fld3587 = T61.Fld3698_) AND (T61.Fld3702_ = FALSE) AND (NOT ((T61.RecorderTRef = '\\000\\000\\000\\311'::bytea AND T61.RecorderRRef IN
(SELECT
T67._Fld3967RRef AS Q_002_F_000RRef
FROM _InfoRg3966 T67))))
LEFT OUTER JOIN (SELECT
T73._Fld4349RRef AS Fld4349RRef,
T73._Fld4350RRef AS Fld4350RRef
FROM (SELECT
T70.Fld4349RRef AS Fld4349RRef,
T70.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T72._RecorderTRef || T72._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T72._RecorderTRef || T72._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T71._Fld4349RRef AS Fld4349RRef,
MAX(T71._Period) AS MAXPERIOD_
FROM _InfoRg4348 T71
WHERE T71._Period <= '2022-08-11 15:52:36'::timestamp AND T71._Active = TRUE
GROUP BY T71._Fld4349RRef) T70
INNER JOIN _InfoRg4348 T72
ON T70.Fld4349RRef = T72._Fld4349RRef AND T70.MAXPERIOD_ = T72._Period
WHERE T72._Active = TRUE
GROUP BY T70.Fld4349RRef,
T70.MAXPERIOD_) T69
INNER JOIN _InfoRg4348 T73
ON T69.Fld4349RRef = T73._Fld4349RRef AND T69.MAXPERIOD_ = T73._Period AND T69.MAXRECORDERTRef = T73._RecorderTRef AND T69.MAXRECORDERRRef = T73._RecorderRRef) T68
ON (T42._Fld3586RRef = T68.Fld4349RRef)
LEFT OUTER JOIN _InfoRg3643 T74
ON (T42._Fld3586RRef = T74._Fld3644RRef) AND (T42._Fld3587 = T74._Fld3646)
LEFT OUTER JOIN _InfoRg4196 T75
ON (T42._Fld3587 = T75._Fld4197) AND ('\\000\\000\\000\\306'::bytea = T75._RecorderTRef AND T42._RecorderRRef = T75._RecorderRRef)
LEFT OUTER JOIN (SELECT
T81._Fld4294RRef AS Fld4294RRef,
T81._Fld4295RRef AS Fld4295RRef
FROM (SELECT
T78.Fld4294RRef AS Fld4294RRef,
T78.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T80._RecorderTRef || T80._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T80._RecorderTRef || T80._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T79._Fld4294RRef AS Fld4294RRef,
MAX(T79._Period) AS MAXPERIOD_
FROM _InfoRg4293 T79
WHERE T79._Period <= '2022-08-11 15:52:36'::timestamp
GROUP BY T79._Fld4294RRef) T78
INNER JOIN _InfoRg4293 T80
ON T78.Fld4294RRef = T80._Fld4294RRef AND T78.MAXPERIOD_ = T80._Period
WHERE (TRUE) = TRUE
GROUP BY T78.Fld4294RRef,
T78.MAXPERIOD_) T77
INNER JOIN _InfoRg4293 T81
ON T77.Fld4294RRef = T81._Fld4294RRef AND T77.MAXPERIOD_ = T81._Period AND T77.MAXRECORDERTRef = T81._RecorderTRef AND T77.MAXRECORDERRRef = T81._RecorderRRef) T76
ON (T42._RecorderRRef = T76.Fld4294RRef)
INNER JOIN _Reference143 T82
ON (T42._Fld3586RRef = T82._IDRRef)
LEFT OUTER JOIN (SELECT
T88._Fld3965 AS Fld3965_,
T88._Fld3963 AS Fld3963_,
T88._Fld3962 AS Fld3962_
FROM (SELECT
T85.Fld3962_ AS Fld3962_,
T85.Fld3963_ AS Fld3963_,
T85.Fld3964_ AS Fld3964_,
T85.MAXPERIOD_ AS MAXPERIOD_,
MAX(T87._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T86._Fld3962 AS Fld3962_,
T86._Fld3963 AS Fld3963_,
T86._Fld3964 AS Fld3964_,
MAX(T86._Period) AS MAXPERIOD_
FROM _InfoRg3961 T86
WHERE T86._Active = TRUE
GROUP BY T86._Fld3962,
T86._Fld3963,
T86._Fld3964) T85
INNER JOIN _InfoRg3961 T87
ON T85.Fld3962_ = T87._Fld3962 AND T85.Fld3963_ = T87._Fld3963 AND T85.Fld3964_ = T87._Fld3964 AND T85.MAXPERIOD_ = T87._Period
WHERE T87._Active = TRUE
GROUP BY T85.Fld3962_,
T85.Fld3963_,
T85.Fld3964_,
T85.MAXPERIOD_) T84
INNER JOIN _InfoRg3961 T88
ON T84.Fld3962_ = T88._Fld3962 AND T84.Fld3963_ = T88._Fld3963 AND T84.Fld3964_ = T88._Fld3964 AND T84.MAXPERIOD_ = T88._Period AND T84.MAXRECORDERRRef = T88._RecorderRRef) T83
ON (T42._Fld3587 = T83.Fld3963_)
LEFT OUTER JOIN (SELECT
T90._IDRRef AS IDRRef,
T90._Fld927RRef AS Fld927RRef
FROM _Document198 T90
WHERE (EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference79 T91
INNER JOIN _Reference69 T92
ON (T91._Fld5546 = 'Документ.торо_ВыявленныеДефекты'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg3504 T93
WHERE (T93._Fld3505RRef = T91._IDRRef) AND (T93._Fld3506RRef = T92._IDRRef)) AND T92._IDRRef IN
(SELECT
T94._Reference69_IDRRef AS Q_005_F_000RRef
FROM _Reference69_VT5412 T94
INNER JOIN _InfoRg3446 T95
ON (T95._Fld3448_TYPE = '\\010'::bytea AND T95._Fld3448_RTRef = '\\000\\000\\000^'::bytea AND T95._Fld3448_RRRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\022\\336\\321\\365'::bytea) AND (T95._Fld3447_TYPE = T94._Fld5414_TYPE AND T95._Fld3447_RTRef = T94._Fld5414_RTRef AND T95._Fld3447_RRRef = T94._Fld5414_RRRef))
WHERE (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg2790 T96
WHERE (T96._Fld2791RRef = T92._IDRRef) AND (T96._Fld2792_TYPE = '\\010'::bytea AND T96._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T96._Fld2792_RRRef = T90._Fld927RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg2797 T97
WHERE (T97._Fld2798RRef = T92._IDRRef) AND T97._Fld2799_TYPE = '\\010'::bytea AND T97._Fld2799_RTRef = '\\000\\000\\000['::bytea AND (T97._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END)) AND (NOT ((EXISTS(SELECT
CAST(1 AS NUMERIC) AS Q_006_F_000_
FROM _Document198_VT938 T98
LEFT OUTER JOIN _Reference143 T99
ON T98._Fld945RRef = T99._IDRRef
LEFT OUTER JOIN _Reference143 T100
ON T98._Fld946RRef = T100._IDRRef
WHERE (T90._IDRRef = T98._Document198_IDRRef) AND (NOT ((EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _Reference79 T101
INNER JOIN _Reference69 T102
ON (T101._Fld5546 = 'Справочник.торо_ОбъектыРемонта'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_010_F_000_
FROM _InfoRg3504 T103
WHERE (T103._Fld3505RRef = T101._IDRRef) AND (T103._Fld3506RRef = T102._IDRRef)) AND T102._IDRRef IN
(SELECT
T104._Reference69_IDRRef AS Q_011_F_000RRef
FROM _Reference69_VT5412 T104
INNER JOIN _InfoRg3446 T105
ON (T105._Fld3448_TYPE = '\\010'::bytea AND T105._Fld3448_RTRef = '\\000\\000\\000^'::bytea AND T105._Fld3448_RRRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\022\\336\\321\\365'::bytea) AND (T105._Fld3447_TYPE = T104._Fld5414_TYPE AND T105._Fld3447_RTRef = T104._Fld5414_RTRef AND T105._Fld3447_RRRef = T104._Fld5414_RRRef))
WHERE ((T99._Fld6601 = FALSE) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg2790 T106
WHERE (T106._Fld2791RRef = T102._IDRRef) AND (T106._Fld2792_TYPE = '\\010'::bytea AND T106._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T106._Fld2792_RRRef = T99._Fld6617RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_009_F_000_
FROM _InfoRg2797 T107
WHERE (T107._Fld2798RRef = T102._IDRRef) AND T107._Fld2799_TYPE = CASE WHEN T99._Fld6617RRef IS NOT NULL THEN '\\010'::bytea END AND T107._Fld2799_RTRef = CASE WHEN T99._Fld6617RRef IS NOT NULL THEN '\\000\\000\\000['::bytea END AND (T107._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END) OR T99._Fld6601 = TRUE)) AND EXISTS(SELECT
TRUE AS Q_012_F_000_
FROM _Reference79 T108
INNER JOIN _Reference69 T109
ON (T108._Fld5546 = 'Справочник.торо_ОбъектыРемонта'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_015_F_000_
FROM _InfoRg3504 T110
WHERE (T110._Fld3505RRef = T108._IDRRef) AND (T110._Fld3506RRef = T109._IDRRef)) AND T109._IDRRef IN
(SELECT
T111._Reference69_IDRRef AS Q_016_F_000RRef
FROM _Reference69_VT5412 T111
INNER JOIN _InfoRg3446 T112
ON (T112._Fld3448_TYPE = '\\010'::bytea AND T112._Fld3448_RTRef = '\\000\\000\\000^'::bytea AND T112._Fld3448_RRRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\022\\336\\321\\365'::bytea) AND (T112._Fld3447_TYPE = T111._Fld5414_TYPE AND T112._Fld3447_RTRef = T111._Fld5414_RTRef AND T112._Fld3447_RRRef = T111._Fld5414_RRRef))
WHERE ((T100._Fld6601 = FALSE) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_013_F_000_
FROM _InfoRg2790 T113
WHERE (T113._Fld2791RRef = T109._IDRRef) AND (T113._Fld2792_TYPE = '\\010'::bytea AND T113._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T113._Fld2792_RRRef = T100._Fld6617RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_014_F_000_
FROM _InfoRg2797 T114
WHERE (T114._Fld2798RRef = T109._IDRRef) AND T114._Fld2799_TYPE = CASE WHEN T100._Fld6617RRef IS NOT NULL THEN '\\010'::bytea END AND T114._Fld2799_RTRef = CASE WHEN T100._Fld6617RRef IS NOT NULL THEN '\\000\\000\\000['::bytea END AND (T114._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END) OR T100._Fld6601 = TRUE))))))))))) T89
ON T42._RecorderRRef = T89.IDRRef
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference79 T115
INNER JOIN _Reference69 T116
ON (T115._Fld5546 = 'РегистрСведений.торо_ВыявленныеДефекты'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg3504 T117
WHERE (T117._Fld3505RRef = T115._IDRRef) AND (T117._Fld3506RRef = T116._IDRRef)) AND T116._IDRRef IN ('\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\336\\022j('::bytea)
WHERE (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg2790 T121
WHERE (T121._Fld2791RRef = T116._IDRRef) AND (T121._Fld2792_TYPE = '\\010'::bytea AND T121._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T121._Fld2792_RRRef = T42._Fld3591RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg2797 T122
WHERE (T122._Fld2798RRef = T116._IDRRef) AND T122._Fld2799_TYPE = '\\010'::bytea AND T122._Fld2799_RTRef = '\\000\\000\\000['::bytea AND (T122._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END)))) AND ((T42._Period <= '2022-08-21 23:59:59'::timestamp) AND (T42._Fld3591RRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351:\\031\\031\\274\\340'::bytea) AND (NOT (((T89.Fld927RRef IS NULL)))) AND (T74._Fld3646 IS NULL) AND (T43.RecorderRRef IS NULL) AND ((T83.Fld3965_ = FALSE) OR (T83.Fld3965_ IS NULL)))
ORDER BY 21 LIMIT 1000) T41
UNION ALL SELECT
CASE WHEN T123.Q_001_F_000RRef IS NOT NULL THEN '\\000\\000\\000\\304'::bytea END,
T123.Q_001_F_000RRef,
T123.Q_001_F_001_,
T123.Q_001_F_002RRef,
T123.Q_001_F_003RRef,
T123.Q_001_F_004_,
CASE WHEN T123.Q_001_F_005RRef IS NOT NULL THEN '\\010'::bytea END,
CASE WHEN T123.Q_001_F_005RRef IS NOT NULL THEN '\\000\\000\\000o'::bytea END,
T123.Q_001_F_005RRef,
T123.Q_001_F_006_,
CASE WHEN T123.Q_001_F_007_TYPE = '\\010'::bytea AND T123.Q_001_F_007_RTRef = '\\000\\000\\000\\210'::bytea THEN T123.Q_001_F_007_RRRef END,
T123.Q_001_F_008_,
T123.Q_001_F_009_,
T123.Q_001_F_010RRef,
T123.Q_001_F_011_,
T123.Q_001_F_012RRef,
T123.Q_001_F_013_TYPE,
T123.Q_001_F_013_S,
T123.Q_001_F_013_RRRef,
T123.Q_001_F_014_,
T123.Q_001_F_015_,
'\\010'::bytea,
''::mvarchar,
T123.Q_001_F_016RRef,
T123.Q_001_F_017_,
T123.Q_001_F_018_
FROM (SELECT DISTINCT
T151._Document196_IDRRef AS Q_001_F_000RRef,
'торо_ВнешнееОснованиеДляРабот'::mvarchar AS Q_001_F_001_,
T124.Fld3559RRef AS Q_001_F_002RRef,
'\\201\\024\\000PV\\230\\204\\346\\021\\352\\220R}\\376C/'::bytea AS Q_001_F_003RRef,
CASE WHEN (NOT (((T182.Fld3698_ IS NULL)))) THEN T182.Fld3700_ ELSE T124.Fld3562_ END AS Q_001_F_004_,
T151._Fld867RRef AS Q_001_F_005RRef,
CASE WHEN (NOT (((T182.Fld3698_ IS NULL)))) THEN T182.Fld3701_ ELSE CAST(NULL AS TIMESTAMP) END AS Q_001_F_006_,
CAST(NULL AS BYTEA) AS Q_001_F_007_TYPE,
CAST(NULL AS BOOLEAN) AS Q_001_F_007_L,
CAST(NULL AS NUMERIC) AS Q_001_F_007_N,
CAST(NULL AS TIMESTAMP) AS Q_001_F_007_T,
CAST(NULL AS MVARCHAR(1)) AS Q_001_F_007_S,
CAST(NULL AS BYTEA) AS Q_001_F_007_B,
CAST(NULL AS BYTEA) AS Q_001_F_007_RTRef,
CAST(NULL AS BYTEA) AS Q_001_F_007_RRRef,
CASE WHEN (NOT (((T195._Fld3646 IS NULL)))) THEN 'Устранен (внешнее основание)'::mvarchar WHEN (NOT (((T170.Fld3848_ IS NULL) AND (T176.Fld3527_ IS NULL)))) THEN 'Устраняется (внешнее основание)'::mvarchar WHEN (NOT (((T182.Fld3698_ IS NULL)))) THEN 'Запланировано устранение (внешнее основание)'::mvarchar ELSE 'Зарегистрирован (внешнее основание)'::mvarchar END AS Q_001_F_008_,
T124.Fld3560_ AS Q_001_F_009_,
T124.Fld3565RRef AS Q_001_F_010RRef,
CASE WHEN (T182.RecorderTRef IS NULL AND T182.RecorderRRef IS NULL) THEN FALSE ELSE TRUE END AS Q_001_F_011_,
T203._Fld6621RRef AS Q_001_F_012RRef,
CASE WHEN (T189.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN '\\005'::bytea ELSE CASE WHEN T189.Fld4350RRef IS NOT NULL THEN '\\010'::bytea END END AS Q_001_F_013_TYPE,
CASE WHEN (T189.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN 'Не установлено'::mvarchar ELSE CASE WHEN T189.Fld4350RRef IS NOT NULL THEN ''::mvarchar END END AS Q_001_F_013_S,
CASE WHEN (T189.Fld4350RRef = '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) THEN '\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea ELSE T189.Fld4350RRef END AS Q_001_F_013_RRRef,
CASE WHEN (T195._Fld3646 IS NULL) THEN FALSE ELSE TRUE END AS Q_001_F_014_,
T196._Fld4205 AS Q_001_F_015_,
COALESCE(T197.Fld4288RRef,'\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000'::bytea) AS Q_001_F_016RRef,
T204.Fld3962_ AS Q_001_F_017_,
COALESCE(CASE WHEN (NOT (((T182.Fld3698_ IS NULL)))) THEN T182.Fld3700_ ELSE T124.Fld3562_ END,'0001-01-01 00:00:00'::timestamp) AS Q_001_F_018_
FROM (SELECT
T143._Fld3564RRef AS Fld3564RRef,
T143._RecorderTRef AS RecorderTRef,
T143._RecorderRRef AS RecorderRRef,
T143._Fld3562 AS Fld3562_,
T143._Fld3560 AS Fld3560_,
T143._Fld3559RRef AS Fld3559RRef,
T143._Fld3565RRef AS Fld3565RRef
FROM (SELECT
T126.Fld3559RRef AS Fld3559RRef,
T126.Fld3560_ AS Fld3560_,
T126.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T135._RecorderTRef || T135._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T135._RecorderTRef || T135._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T127._Fld3559RRef AS Fld3559RRef,
T127._Fld3560 AS Fld3560_,
MAX(T127._Period) AS MAXPERIOD_
FROM _InfoRg3558 T127
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference79 T128
INNER JOIN _Reference69 T129
ON (T128._Fld5546 = 'РегистрСведений.торо_ВнешниеОснованияДляРабот'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg3504 T130
WHERE (T130._Fld3505RRef = T128._IDRRef) AND (T130._Fld3506RRef = T129._IDRRef)) AND T129._IDRRef IN ('\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\336\\022j('::bytea)
WHERE (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg2790 T133
WHERE (T133._Fld2791RRef = T129._IDRRef) AND (T133._Fld2792_TYPE = '\\010'::bytea AND T133._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T133._Fld2792_RRRef = T127._Fld3564RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg2797 T134
WHERE (T134._Fld2798RRef = T129._IDRRef) AND T134._Fld2799_TYPE = '\\010'::bytea AND T134._Fld2799_RTRef = '\\000\\000\\000['::bytea AND (T134._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END)))) AND (T127._Period <= '2022-08-21 23:59:59'::timestamp AND T127._Active = TRUE)
GROUP BY T127._Fld3559RRef,
T127._Fld3560) T126
INNER JOIN _InfoRg3558 T135
ON T126.Fld3559RRef = T135._Fld3559RRef AND T126.Fld3560_ = T135._Fld3560 AND T126.MAXPERIOD_ = T135._Period
WHERE ((EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference79 T136
INNER JOIN _Reference69 T137
ON (T136._Fld5546 = 'РегистрСведений.торо_ВнешниеОснованияДляРабот'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg3504 T138
WHERE (T138._Fld3505RRef = T136._IDRRef) AND (T138._Fld3506RRef = T137._IDRRef)) AND T137._IDRRef IN ('\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\336\\022j('::bytea)
WHERE (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg2790 T141
WHERE (T141._Fld2791RRef = T137._IDRRef) AND (T141._Fld2792_TYPE = '\\010'::bytea AND T141._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T141._Fld2792_RRRef = T135._Fld3564RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg2797 T142
WHERE (T142._Fld2798RRef = T137._IDRRef) AND T142._Fld2799_TYPE = '\\010'::bytea AND T142._Fld2799_RTRef = '\\000\\000\\000['::bytea AND (T142._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END)))) AND (T135._Active = TRUE)
GROUP BY T126.Fld3559RRef,
T126.Fld3560_,
T126.MAXPERIOD_) T125
INNER JOIN _InfoRg3558 T143
ON T125.Fld3559RRef = T143._Fld3559RRef AND T125.Fld3560_ = T143._Fld3560 AND T125.MAXPERIOD_ = T143._Period AND T125.MAXRECORDERTRef = T143._RecorderTRef AND T125.MAXRECORDERRRef = T143._RecorderRRef
WHERE (EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference79 T144
INNER JOIN _Reference69 T145
ON (T144._Fld5546 = 'РегистрСведений.торо_ВнешниеОснованияДляРабот'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg3504 T146
WHERE (T146._Fld3505RRef = T144._IDRRef) AND (T146._Fld3506RRef = T145._IDRRef)) AND T145._IDRRef IN ('\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\336\\022j('::bytea)
WHERE (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg2790 T149
WHERE (T149._Fld2791RRef = T145._IDRRef) AND (T149._Fld2792_TYPE = '\\010'::bytea AND T149._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T149._Fld2792_RRRef = T143._Fld3564RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg2797 T150
WHERE (T150._Fld2798RRef = T145._IDRRef) AND T150._Fld2799_TYPE = '\\010'::bytea AND T150._Fld2799_RTRef = '\\000\\000\\000['::bytea AND (T150._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END)))) T124
LEFT OUTER JOIN _Document196_VT860 T151
INNER JOIN (SELECT
T153._IDRRef AS IDRRef,
T153._Fld853RRef AS Fld853RRef
FROM _Document196 T153
WHERE (EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference79 T154
INNER JOIN _Reference69 T155
ON (T154._Fld5546 = 'Документ.торо_ВнешнееОснованиеДляРабот'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg3504 T156
WHERE (T156._Fld3505RRef = T154._IDRRef) AND (T156._Fld3506RRef = T155._IDRRef)) AND T155._IDRRef IN
(SELECT
T157._Reference69_IDRRef AS Q_005_F_000RRef
FROM _Reference69_VT5412 T157
INNER JOIN _InfoRg3446 T158
ON (T158._Fld3448_TYPE = '\\010'::bytea AND T158._Fld3448_RTRef = '\\000\\000\\000^'::bytea AND T158._Fld3448_RRRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\022\\336\\321\\365'::bytea) AND (T158._Fld3447_TYPE = T157._Fld5414_TYPE AND T158._Fld3447_RTRef = T157._Fld5414_RTRef AND T158._Fld3447_RRRef = T157._Fld5414_RRRef))
WHERE (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg2790 T159
WHERE (T159._Fld2791RRef = T155._IDRRef) AND (T159._Fld2792_TYPE = '\\010'::bytea AND T159._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T159._Fld2792_RRRef = T153._Fld853RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg2797 T160
WHERE (T160._Fld2798RRef = T155._IDRRef) AND T160._Fld2799_TYPE = '\\010'::bytea AND T160._Fld2799_RTRef = '\\000\\000\\000['::bytea AND (T160._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END)) AND (NOT ((EXISTS(SELECT
CAST(1 AS NUMERIC) AS Q_006_F_000_
FROM _Document196_VT860 T161
LEFT OUTER JOIN _Reference143 T162
ON T161._Fld863RRef = T162._IDRRef
WHERE (T153._IDRRef = T161._Document196_IDRRef) AND (NOT ((EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _Reference79 T163
INNER JOIN _Reference69 T164
ON (T163._Fld5546 = 'Справочник.торо_ОбъектыРемонта'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_010_F_000_
FROM _InfoRg3504 T165
WHERE (T165._Fld3505RRef = T163._IDRRef) AND (T165._Fld3506RRef = T164._IDRRef)) AND T164._IDRRef IN
(SELECT
T166._Reference69_IDRRef AS Q_011_F_000RRef
FROM _Reference69_VT5412 T166
INNER JOIN _InfoRg3446 T167
ON (T167._Fld3448_TYPE = '\\010'::bytea AND T167._Fld3448_RTRef = '\\000\\000\\000^'::bytea AND T167._Fld3448_RRRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\022\\336\\321\\365'::bytea) AND (T167._Fld3447_TYPE = T166._Fld5414_TYPE AND T167._Fld3447_RTRef = T166._Fld5414_RTRef AND T167._Fld3447_RRRef = T166._Fld5414_RRRef))
WHERE ((T162._Fld6601 = FALSE) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg2790 T168
WHERE (T168._Fld2791RRef = T164._IDRRef) AND (T168._Fld2792_TYPE = '\\010'::bytea AND T168._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T168._Fld2792_RRRef = T162._Fld6617RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_009_F_000_
FROM _InfoRg2797 T169
WHERE (T169._Fld2798RRef = T164._IDRRef) AND T169._Fld2799_TYPE = CASE WHEN T162._Fld6617RRef IS NOT NULL THEN '\\010'::bytea END AND T169._Fld2799_RTRef = CASE WHEN T162._Fld6617RRef IS NOT NULL THEN '\\000\\000\\000['::bytea END AND (T169._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END) OR T162._Fld6601 = TRUE))))))))))) T152
ON T151._Document196_IDRRef = T152.IDRRef
ON (T124.Fld3560_ = T151._Fld862)
LEFT OUTER JOIN (SELECT
T175._Fld3848 AS Fld3848_
FROM (SELECT
T172.Fld3848_ AS Fld3848_,
T172.MAXPERIOD_ AS MAXPERIOD_,
MAX(T174._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T173._Fld3848 AS Fld3848_,
MAX(T173._Period) AS MAXPERIOD_
FROM _InfoRg3847 T173
WHERE T173._Active = TRUE
GROUP BY T173._Fld3848) T172
INNER JOIN _InfoRg3847 T174
ON T172.Fld3848_ = T174._Fld3848 AND T172.MAXPERIOD_ = T174._Period
WHERE T174._Active = TRUE
GROUP BY T172.Fld3848_,
T172.MAXPERIOD_) T171
INNER JOIN _InfoRg3847 T175
ON T171.Fld3848_ = T175._Fld3848 AND T171.MAXPERIOD_ = T175._Period AND T171.MAXRECORDERRRef = T175._RecorderRRef) T170
ON (T124.Fld3560_ = T170.Fld3848_)
LEFT OUTER JOIN (SELECT
T181._Fld3527 AS Fld3527_
FROM (SELECT
T178.Fld3527_ AS Fld3527_,
T178.MAXPERIOD_ AS MAXPERIOD_,
MAX(T180._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T179._Fld3527 AS Fld3527_,
MAX(T179._Period) AS MAXPERIOD_
FROM _InfoRg3526 T179
WHERE T179._Active = TRUE
GROUP BY T179._Fld3527) T178
INNER JOIN _InfoRg3526 T180
ON T178.Fld3527_ = T180._Fld3527 AND T178.MAXPERIOD_ = T180._Period
WHERE T180._Active = TRUE
GROUP BY T178.Fld3527_,
T178.MAXPERIOD_) T177
INNER JOIN _InfoRg3526 T181
ON T177.Fld3527_ = T181._Fld3527 AND T177.MAXPERIOD_ = T181._Period AND T177.MAXRECORDERRRef = T181._RecorderRRef) T176
ON (T124.Fld3560_ = T176.Fld3527_)
LEFT OUTER JOIN (SELECT
T187._Fld3698 AS Fld3698_,
T187._Fld3702 AS Fld3702_,
T187._RecorderTRef AS RecorderTRef,
T187._RecorderRRef AS RecorderRRef,
T187._Fld3700 AS Fld3700_,
T187._Fld3701 AS Fld3701_
FROM (SELECT
T184.Fld3698_ AS Fld3698_,
T184.Fld3699_ AS Fld3699_,
T184.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T186._RecorderTRef || T186._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T186._RecorderTRef || T186._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T185._Fld3698 AS Fld3698_,
T185._Fld3699 AS Fld3699_,
MAX(T185._Period) AS MAXPERIOD_
FROM _InfoRg3697 T185
WHERE T185._Active = TRUE
GROUP BY T185._Fld3698,
T185._Fld3699) T184
INNER JOIN _InfoRg3697 T186
ON T184.Fld3698_ = T186._Fld3698 AND T184.Fld3699_ = T186._Fld3699 AND T184.MAXPERIOD_ = T186._Period
WHERE T186._Active = TRUE
GROUP BY T184.Fld3698_,
T184.Fld3699_,
T184.MAXPERIOD_) T183
INNER JOIN _InfoRg3697 T187
ON T183.Fld3698_ = T187._Fld3698 AND T183.Fld3699_ = T187._Fld3699 AND T183.MAXPERIOD_ = T187._Period AND T183.MAXRECORDERTRef = T187._RecorderTRef AND T183.MAXRECORDERRRef = T187._RecorderRRef) T182
ON (T124.Fld3560_ = T182.Fld3698_) AND (T182.Fld3702_ = FALSE) AND (NOT ((T182.RecorderTRef = '\\000\\000\\000\\311'::bytea AND T182.RecorderRRef IN
(SELECT
T188._Fld3967RRef AS Q_002_F_000RRef
FROM _InfoRg3966 T188))))
LEFT OUTER JOIN (SELECT
T194._Fld4349RRef AS Fld4349RRef,
T194._Fld4350RRef AS Fld4350RRef
FROM (SELECT
T191.Fld4349RRef AS Fld4349RRef,
T191.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T193._RecorderTRef || T193._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T193._RecorderTRef || T193._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T192._Fld4349RRef AS Fld4349RRef,
MAX(T192._Period) AS MAXPERIOD_
FROM _InfoRg4348 T192
WHERE T192._Period <= '2022-08-11 15:52:36'::timestamp AND T192._Active = TRUE
GROUP BY T192._Fld4349RRef) T191
INNER JOIN _InfoRg4348 T193
ON T191.Fld4349RRef = T193._Fld4349RRef AND T191.MAXPERIOD_ = T193._Period
WHERE T193._Active = TRUE
GROUP BY T191.Fld4349RRef,
T191.MAXPERIOD_) T190
INNER JOIN _InfoRg4348 T194
ON T190.Fld4349RRef = T194._Fld4349RRef AND T190.MAXPERIOD_ = T194._Period AND T190.MAXRECORDERTRef = T194._RecorderTRef AND T190.MAXRECORDERRRef = T194._RecorderRRef) T189
ON (T124.Fld3559RRef = T189.Fld4349RRef)
LEFT OUTER JOIN _InfoRg3643 T195
ON (T124.Fld3559RRef = T195._Fld3644RRef) AND (T124.Fld3560_ = T195._Fld3646)
LEFT OUTER JOIN _InfoRg4196 T196
ON (T124.Fld3560_ = T196._Fld4197) AND ('\\000\\000\\000\\304'::bytea = T196._RecorderTRef AND T151._Document196_IDRRef = T196._RecorderRRef)
LEFT OUTER JOIN (SELECT
T202._Fld4287RRef AS Fld4287RRef,
T202._Fld4288RRef AS Fld4288RRef
FROM (SELECT
T199.Fld4287RRef AS Fld4287RRef,
T199.MAXPERIOD_ AS MAXPERIOD_,
SUBSTR(MAX(T201._RecorderTRef || T201._RecorderRRef),1,4) AS MAXRECORDERTRef,
SUBSTR(MAX(T201._RecorderTRef || T201._RecorderRRef),5,16) AS MAXRECORDERRRef
FROM (SELECT
T200._Fld4287RRef AS Fld4287RRef,
MAX(T200._Period) AS MAXPERIOD_
FROM _InfoRg4286 T200
WHERE T200._Period <= '2022-08-11 15:52:36'::timestamp AND T200._Active = TRUE
GROUP BY T200._Fld4287RRef) T199
INNER JOIN _InfoRg4286 T201
ON T199.Fld4287RRef = T201._Fld4287RRef AND T199.MAXPERIOD_ = T201._Period
WHERE T201._Active = TRUE
GROUP BY T199.Fld4287RRef,
T199.MAXPERIOD_) T198
INNER JOIN _InfoRg4286 T202
ON T198.Fld4287RRef = T202._Fld4287RRef AND T198.MAXPERIOD_ = T202._Period AND T198.MAXRECORDERTRef = T202._RecorderTRef AND T198.MAXRECORDERRRef = T202._RecorderRRef) T197
ON (T151._Document196_IDRRef = T197.Fld4287RRef)
INNER JOIN _Reference143 T203
ON (T124.Fld3559RRef = T203._IDRRef)
LEFT OUTER JOIN (SELECT
T209._Fld3965 AS Fld3965_,
T209._Fld3963 AS Fld3963_,
T209._Fld3962 AS Fld3962_
FROM (SELECT
T206.Fld3962_ AS Fld3962_,
T206.Fld3963_ AS Fld3963_,
T206.Fld3964_ AS Fld3964_,
T206.MAXPERIOD_ AS MAXPERIOD_,
MAX(T208._RecorderRRef) AS MAXRECORDERRRef
FROM (SELECT
T207._Fld3962 AS Fld3962_,
T207._Fld3963 AS Fld3963_,
T207._Fld3964 AS Fld3964_,
MAX(T207._Period) AS MAXPERIOD_
FROM _InfoRg3961 T207
WHERE T207._Active = TRUE
GROUP BY T207._Fld3962,
T207._Fld3963,
T207._Fld3964) T206
INNER JOIN _InfoRg3961 T208
ON T206.Fld3962_ = T208._Fld3962 AND T206.Fld3963_ = T208._Fld3963 AND T206.Fld3964_ = T208._Fld3964 AND T206.MAXPERIOD_ = T208._Period
WHERE T208._Active = TRUE
GROUP BY T206.Fld3962_,
T206.Fld3963_,
T206.Fld3964_,
T206.MAXPERIOD_) T205
INNER JOIN _InfoRg3961 T209
ON T205.Fld3962_ = T209._Fld3962 AND T205.Fld3963_ = T209._Fld3963 AND T205.Fld3964_ = T209._Fld3964 AND T205.MAXPERIOD_ = T209._Period AND T205.MAXRECORDERRRef = T209._RecorderRRef) T204
ON (T124.Fld3560_ = T204.Fld3963_)
LEFT OUTER JOIN (SELECT
T211._IDRRef AS IDRRef,
T211._Fld853RRef AS Fld853RRef
FROM _Document196 T211
WHERE (EXISTS(SELECT
TRUE AS Q_001_F_000_
FROM _Reference79 T212
INNER JOIN _Reference69 T213
ON (T212._Fld5546 = 'Документ.торо_ВнешнееОснованиеДляРабот'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_004_F_000_
FROM _InfoRg3504 T214
WHERE (T214._Fld3505RRef = T212._IDRRef) AND (T214._Fld3506RRef = T213._IDRRef)) AND T213._IDRRef IN
(SELECT
T215._Reference69_IDRRef AS Q_005_F_000RRef
FROM _Reference69_VT5412 T215
INNER JOIN _InfoRg3446 T216
ON (T216._Fld3448_TYPE = '\\010'::bytea AND T216._Fld3448_RTRef = '\\000\\000\\000^'::bytea AND T216._Fld3448_RRRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\022\\336\\321\\365'::bytea) AND (T216._Fld3447_TYPE = T215._Fld5414_TYPE AND T216._Fld3447_RTRef = T215._Fld5414_RTRef AND T216._Fld3447_RRRef = T215._Fld5414_RRRef))
WHERE (1=1) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_002_F_000_
FROM _InfoRg2790 T217
WHERE (T217._Fld2791RRef = T213._IDRRef) AND (T217._Fld2792_TYPE = '\\010'::bytea AND T217._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T217._Fld2792_RRRef = T211._Fld853RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_003_F_000_
FROM _InfoRg2797 T218
WHERE (T218._Fld2798RRef = T213._IDRRef) AND T218._Fld2799_TYPE = '\\010'::bytea AND T218._Fld2799_RTRef = '\\000\\000\\000['::bytea AND (T218._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END)) AND (NOT ((EXISTS(SELECT
CAST(1 AS NUMERIC) AS Q_006_F_000_
FROM _Document196_VT860 T219
LEFT OUTER JOIN _Reference143 T220
ON T219._Fld863RRef = T220._IDRRef
WHERE (T211._IDRRef = T219._Document196_IDRRef) AND (NOT ((EXISTS(SELECT
TRUE AS Q_007_F_000_
FROM _Reference79 T221
INNER JOIN _Reference69 T222
ON (T221._Fld5546 = 'Справочник.торо_ОбъектыРемонта'::mvarchar) AND EXISTS(SELECT
TRUE AS Q_010_F_000_
FROM _InfoRg3504 T223
WHERE (T223._Fld3505RRef = T221._IDRRef) AND (T223._Fld3506RRef = T222._IDRRef)) AND T222._IDRRef IN
(SELECT
T224._Reference69_IDRRef AS Q_011_F_000RRef
FROM _Reference69_VT5412 T224
INNER JOIN _InfoRg3446 T225
ON (T225._Fld3448_TYPE = '\\010'::bytea AND T225._Fld3448_RTRef = '\\000\\000\\000^'::bytea AND T225._Fld3448_RRRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351C\\022\\336\\321\\365'::bytea) AND (T225._Fld3447_TYPE = T224._Fld5414_TYPE AND T225._Fld3447_RTRef = T224._Fld5414_RTRef AND T225._Fld3447_RRRef = T224._Fld5414_RRRef))
WHERE ((T220._Fld6601 = FALSE) AND (CASE WHEN EXISTS(SELECT
TRUE AS Q_008_F_000_
FROM _InfoRg2790 T226
WHERE (T226._Fld2791RRef = T222._IDRRef) AND (T226._Fld2792_TYPE = '\\010'::bytea AND T226._Fld2792_RTRef = '\\000\\000\\000['::bytea AND T226._Fld2792_RRRef = T220._Fld6617RRef)) THEN TRUE ELSE FALSE END = CASE WHEN EXISTS(SELECT
TRUE AS Q_009_F_000_
FROM _InfoRg2797 T227
WHERE (T227._Fld2798RRef = T222._IDRRef) AND T227._Fld2799_TYPE = CASE WHEN T220._Fld6617RRef IS NOT NULL THEN '\\010'::bytea END AND T227._Fld2799_RTRef = CASE WHEN T220._Fld6617RRef IS NOT NULL THEN '\\000\\000\\000['::bytea END AND (T227._Fld2800 = FALSE)) THEN TRUE ELSE FALSE END) OR T220._Fld6601 = TRUE))))))))))) T210
ON T151._Document196_IDRRef = T210.IDRRef
WHERE (T124.Fld3564RRef = '\\243\\006\\000PV\\222\\234\\370\\021\\354\\351:\\031\\031\\274\\340'::bytea) AND ((('\\010'::bytea || T124.RecorderTRef) <> '\\010\\000\\000\\000\\306'::bytea)) AND (T124.Fld3562_ <= '2022-08-21 23:59:59'::timestamp) AND (NOT (((T124.Fld3564RRef IS NULL)))) AND (NOT (((T210.Fld853RRef IS NULL)))) AND (T195._Fld3646 IS NULL) AND ((T204.Fld3965_ = FALSE) OR (T204.Fld3965_ IS NULL))
ORDER BY 28 LIMIT 1000) T123
ORDER BY 26

Actions #1

Updated by Сергей Старых about 2 months ago

  • Subject changed from Обеспечить разбор запроса Postgre to Улучшена поддержка диалекта Postgre SQL
  • Description updated (diff)
  • Status changed from New to Closed
Actions #2

Updated by Сергей Старых about 2 months ago

  • Sprint/Milestone changed from Разработка to 6.40.1

Also available in: Atom PDF