Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 44.610=TotalDurationSec,14.870=AvgDurationSec,3=Execs,,4,Sql="SELECT
- T1.Fld11290_TYPE,
- T1.Fld11290_RTRef,
- T1.Fld11290_RRRef,
- T1.Fld11301Turnover_,
- T1.Fld11302Turnover_,
- CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T74._Fld1559RRef ELSE CAST(NULL AS BINARY(16)) END,
- CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T74._Fld1558 ELSE CAST(NULL AS NVARCHAR(35)) END,
- CASE WHEN (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058) THEN CASE WHEN CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T1.Fld11290_RRRef END IS NOT NULL THEN 0x00000058 END WHEN (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x0000005B) THEN CASE WHEN CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x0000005B THEN T1.Fld11290_RRRef END IS NOT NULL THEN 0x0000005B END END,
- CASE WHEN (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058) THEN CASE WHEN T1.Fld11290_TYPE = 0x08 THEN T1.Fld11290_RRRef WHEN T1.Fld11290_TYPE IN (0x08) THEN ? END WHEN (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x0000005B) THEN CASE WHEN T1.Fld11290_TYPE = 0x08 THEN T1.Fld11290_RRRef WHEN T1.Fld11290_TYPE IN (0x08) THEN ? END END,
- CASE WHEN (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058) THEN T74._Description WHEN (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x0000005B) THEN T75._Description END,
- CASE WHEN (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058) THEN 0.0 WHEN (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x0000005B) THEN 1.0 END,
- CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T74._Fld1559RRef ELSE CAST(NULL AS BINARY(16)) END,
- T76._Description,
- CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T77._Description ELSE CAST(NULL AS NVARCHAR(25)) END
- FROM (SELECT
- T2._Fld11293_TYPE AS Fld11293_TYPE,
- T2._Fld11293_RTRef AS Fld11293_RTRef,
- T2._Fld11293_RRRef AS Fld11293_RRRef,
- T2._Fld11290_TYPE AS Fld11290_TYPE,
- T2._Fld11290_RTRef AS Fld11290_RTRef,
- T2._Fld11290_RRRef AS Fld11290_RRRef,
- CAST(SUM(T2._Fld11301) AS NUMERIC(32, 8)) AS Fld11301Turnover_,
- CAST(SUM(T2._Fld11302) AS NUMERIC(33, 8)) AS Fld11302Turnover_
- FROM dbo._AccumRgTn11305 T2
- WHERE (((T2._Fld595 = ?)) AND (EXISTS(SELECT
- 1
- FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
- LEFT OUTER JOIN dbo._Document233 T3
- ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000E9 AND T2._Fld11293_RRRef = T3._IDRRef) AND (T3._Fld595 = ?)
- LEFT OUTER JOIN dbo._Document212 T4
- ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D4 AND T2._Fld11293_RRRef = T4._IDRRef) AND (T4._Fld595 = ?)
- LEFT OUTER JOIN dbo._Document234 T5
- ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000EA AND T2._Fld11293_RRRef = T5._IDRRef) AND (T5._Fld595 = ?)
- LEFT OUTER JOIN dbo._Document263 T6
- ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x00000107 AND T2._Fld11293_RRRef = T6._IDRRef) AND (T6._Fld595 = ?)
- LEFT OUTER JOIN dbo._Document216 T7
- ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D8 AND T2._Fld11293_RRRef = T7._IDRRef) AND (T7._Fld595 = ?)
- LEFT OUTER JOIN dbo._Document215 T8
- ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D7 AND T2._Fld11293_RRRef = T8._IDRRef) AND (T8._Fld595 = ?)
- LEFT OUTER JOIN dbo._Document213 T9
- ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D5 AND T2._Fld11293_RRRef = T9._IDRRef) AND (T9._Fld595 = ?)
- LEFT OUTER JOIN dbo._Document199 T10
- ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000C7 AND T2._Fld11293_RRRef = T10._IDRRef) AND (T10._Fld595 = ?)
- LEFT OUTER JOIN dbo._Reference42 T11
- ON ((CASE WHEN T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000E9 THEN T3._Fld4625RRef WHEN T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D4 THEN T4._Fld3516RRef WHEN T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000EA THEN T5._Fld4774RRef WHEN T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x00000107 THEN T6._Fld6287RRef WHEN T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D8 THEN T7._Fld3845RRef WHEN T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D7 THEN T8._Fld3734RRef WHEN T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D5 THEN T9._Fld3600RRef WHEN T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000C7 THEN T10._Fld2840RRef ELSE CAST(NULL AS BINARY(16)) END = T11._IDRRef)) AND (T11._Fld595 = ?)
- WHERE EXISTS(SELECT
- 0x01 AS Q_001_F_000_
- FROM dbo._Reference98 T12
- INNER JOIN dbo._Reference21 T13
- ON (((T12._Fld1685 = ?) AND EXISTS(SELECT
- 0x01 AS Q_004_F_000_
- FROM dbo._InfoRg11709 T14
- WHERE ((T14._Fld595 = ?)) AND ((T14._Fld12065RRef = T12._IDRRef) AND (T14._Fld12066RRef = T13._IDRRef)))) AND T13._IDRRef IN
- (SELECT
- T15._Reference21_IDRRef AS Q_005_F_000RRef
- FROM dbo._Reference21_VT782 T15
- INNER JOIN dbo._InfoRg9937 T16
- ON ((T16._Fld9939_TYPE = 0x08 AND T16._Fld9939_RTRef = 0x00000095 AND T16._Fld9939_RRRef = ?) AND (T16._Fld9938_TYPE = T15._Fld784_TYPE AND T16._Fld9938_RTRef = T15._Fld784_RTRef AND T16._Fld9938_RRRef = T15._Fld784_RRRef))
- WHERE ((T15._Fld595 = ?)) AND (T16._Fld595 = ?)))
- WHERE ((T13._Fld595 = ?)) AND ((CASE WHEN T11._Fld12836RRef IS NULL THEN 0x01 ELSE CASE WHEN T11._Fld12836RRef IS NOT NULL THEN 0x08 END END <> 0x01) AND (CASE WHEN EXISTS(SELECT
- 0x01 AS Q_002_F_000_
- FROM dbo._InfoRg11710 T17
- WHERE ((T17._Fld595 = ?)) AND ((T17._Fld12072RRef = T13._IDRRef) AND (T17._Fld12073_TYPE = CASE WHEN T11._Fld12836RRef IS NOT NULL THEN 0x08 END AND T17._Fld12073_RTRef = CASE WHEN T11._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND T17._Fld12073_RRRef = T11._Fld12836RRef))) THEN 0x01 ELSE 0x00 END = CASE WHEN EXISTS(SELECT
- 0x01 AS Q_003_F_000_
- FROM dbo._InfoRg11715 T18
- WHERE ((T18._Fld595 = ?)) AND ((T18._Fld12199RRef = T13._IDRRef) AND T18._Fld12200_TYPE = CASE WHEN T11._Fld12836RRef IS NOT NULL THEN 0x08 END AND T18._Fld12200_RTRef = CASE WHEN T11._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND (T18._Fld12201 = 0x00))) THEN 0x01 ELSE 0x00 END)))))) AND (T2._Period >= ? AND T2._Period < ? AND (T2._Fld11301 <> ? OR T2._Fld11302 <> ?))
- GROUP BY T2._Fld11293_TYPE,
- T2._Fld11293_RTRef,
- T2._Fld11293_RRRef,
- T2._Fld11290_TYPE,
- T2._Fld11290_RTRef,
- T2._Fld11290_RRRef
- HAVING (CAST(SUM(T2._Fld11301) AS NUMERIC(32, 8))) <> 0.0 OR (CAST(SUM(T2._Fld11302) AS NUMERIC(33, 8))) <> 0.0) T1
- LEFT OUTER JOIN (SELECT
- T20._IDRRef AS IDRRef,
- T20._Fld4625RRef AS Fld4625RRef,
- T20._Fld595 AS Fld595_
- FROM dbo._Document233 T20
- WHERE ((EXISTS(SELECT
- 1
- FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
- LEFT OUTER JOIN dbo._Reference42 T21
- ON ((T20._Fld4625RRef = T21._IDRRef)) AND (T21._Fld595 = ?)
- WHERE EXISTS(SELECT
- 0x01 AS Q_001_F_000_
- FROM dbo._Reference98 T22
- INNER JOIN dbo._Reference21 T23
- ON (((T22._Fld1685 = ?) AND EXISTS(SELECT
- 0x01 AS Q_004_F_000_
- FROM dbo._InfoRg11709 T24
- WHERE ((T24._Fld595 = ?)) AND ((T24._Fld12065RRef = T22._IDRRef) AND (T24._Fld12066RRef = T23._IDRRef)))) AND T23._IDRRef IN
- (SELECT
- T25._Reference21_IDRRef AS Q_005_F_000RRef
- FROM dbo._Reference21_VT782 T25
- INNER JOIN dbo._InfoRg9937 T26
- ON ((T26._Fld9939_TYPE = 0x08 AND T26._Fld9939_RTRef = 0x00000095 AND T26._Fld9939_RRRef = ?) AND (T26._Fld9938_TYPE = T25._Fld784_TYPE AND T26._Fld9938_RTRef = T25._Fld784_RTRef AND T26._Fld9938_RRRef = T25._Fld784_RRRef))
- WHERE ((T25._Fld595 = ?)) AND (T26._Fld595 = ?)))
- WHERE ((T23._Fld595 = ?)) AND ((CASE WHEN T21._Fld12836RRef IS NULL THEN 0x01 ELSE CASE WHEN T21._Fld12836RRef IS NOT NULL THEN 0x08 END END <> 0x01) AND (CASE WHEN EXISTS(SELECT
- 0x01 AS Q_002_F_000_
- FROM dbo._InfoRg11710 T27
- WHERE ((T27._Fld595 = ?)) AND ((T27._Fld12072RRef = T23._IDRRef) AND (T27._Fld12073_TYPE = CASE WHEN T21._Fld12836RRef IS NOT NULL THEN 0x08 END AND T27._Fld12073_RTRef = CASE WHEN T21._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND T27._Fld12073_RRRef = T21._Fld12836RRef))) THEN 0x01 ELSE 0x00 END = CASE WHEN EXISTS(SELECT
- 0x01 AS Q_003_F_000_
- FROM dbo._InfoRg11715 T28
- WHERE ((T28._Fld595 = ?)) AND ((T28._Fld12199RRef = T23._IDRRef) AND T28._Fld12200_TYPE = CASE WHEN T21._Fld12836RRef IS NOT NULL THEN 0x08 END AND T28._Fld12200_RTRef = CASE WHEN T21._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND (T28._Fld12201 = 0x00))) THEN 0x01 ELSE 0x00 END)))))) AND (T20._Fld595 = ?)) T19
- ON T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000E9 AND T1.Fld11293_RRRef = T19.IDRRef
- LEFT OUTER JOIN dbo._Document212 T29
- ON (T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D4 AND T1.Fld11293_RRRef = T29._IDRRef) AND (T29._Fld595 = ?)
- LEFT OUTER JOIN (SELECT
- T31._IDRRef AS IDRRef,
- T31._Fld4774RRef AS Fld4774RRef,
- T31._Fld4779RRef AS Fld4779RRef,
- T31._Fld595 AS Fld595_
- FROM dbo._Document234 T31
- WHERE ((EXISTS(SELECT
- 1
- FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
- LEFT OUTER JOIN dbo._Reference42 T32
- ON ((T31._Fld4774RRef = T32._IDRRef)) AND (T32._Fld595 = ?)
- WHERE EXISTS(SELECT
- 0x01 AS Q_001_F_000_
- FROM dbo._Reference98 T33
- INNER JOIN dbo._Reference21 T34
- ON (((T33._Fld1685 = ?) AND EXISTS(SELECT
- 0x01 AS Q_006_F_000_
- FROM dbo._InfoRg11709 T35
- WHERE ((T35._Fld595 = ?)) AND ((T35._Fld12065RRef = T33._IDRRef) AND (T35._Fld12066RRef = T34._IDRRef)))) AND T34._IDRRef IN
- (SELECT
- T36._Reference21_IDRRef AS Q_007_F_000RRef
- FROM dbo._Reference21_VT782 T36
- INNER JOIN dbo._InfoRg9937 T37
- ON ((T37._Fld9939_TYPE = 0x08 AND T37._Fld9939_RTRef = 0x00000095 AND T37._Fld9939_RRRef = ?) AND (T37._Fld9938_TYPE = T36._Fld784_TYPE AND T37._Fld9938_RTRef = T36._Fld784_RTRef AND T37._Fld9938_RRRef = T36._Fld784_RRRef))
- WHERE ((T36._Fld595 = ?)) AND (T37._Fld595 = ?)))
- WHERE ((T34._Fld595 = ?)) AND ((0x08 <> 0x01) AND (CASE WHEN EXISTS(SELECT
- 0x01 AS Q_002_F_000_
- FROM dbo._InfoRg11710 T38
- WHERE ((T38._Fld595 = ?)) AND ((T38._Fld12072RRef = T34._IDRRef) AND (T38._Fld12073_TYPE = 0x08 AND T38._Fld12073_RTRef = 0x0000001C AND T38._Fld12073_RRRef = T31._Fld4779RRef))) THEN 0x01 ELSE 0x00 END = CASE WHEN EXISTS(SELECT
- 0x01 AS Q_003_F_000_
- FROM dbo._InfoRg11715 T39
- WHERE ((T39._Fld595 = ?)) AND ((T39._Fld12199RRef = T34._IDRRef) AND T39._Fld12200_TYPE = 0x08 AND T39._Fld12200_RTRef = 0x0000001C AND (T39._Fld12201 = 0x00))) THEN 0x01 ELSE 0x00 END) AND (CASE WHEN T32._Fld12836RRef IS NULL THEN 0x01 ELSE CASE WHEN T32._Fld12836RRef IS NOT NULL THEN 0x08 END END <> 0x01) AND (CASE WHEN EXISTS(SELECT
- 0x01 AS Q_004_F_000_
- FROM dbo._InfoRg11710 T40
- WHERE ((T40._Fld595 = ?)) AND ((T40._Fld12072RRef = T34._IDRRef) AND (T40._Fld12073_TYPE = CASE WHEN T32._Fld12836RRef IS NOT NULL THEN 0x08 END AND T40._Fld12073_RTRef = CASE WHEN T32._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND T40._Fld12073_RRRef = T32._Fld12836RRef))) THEN 0x01 ELSE 0x00 END = CASE WHEN EXISTS(SELECT
- 0x01 AS Q_005_F_000_
- FROM dbo._InfoRg11715 T41
- WHERE ((T41._Fld595 = ?)) AND ((T41._Fld12199RRef = T34._IDRRef) AND T41._Fld12200_TYPE = CASE WHEN T32._Fld12836RRef IS NOT NULL THEN 0x08 END AND T41._Fld12200_RTRef = CASE WHEN T32._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND (T41._Fld12201 = 0x00))) THEN 0x01 ELSE 0x00 END)))))) AND (T31._Fld595 = ?)) T30
- ON T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000EA AND T1.Fld11293_RRRef = T30.IDRRef
- LEFT OUTER JOIN dbo._Document263 T42
- ON (T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x00000107 AND T1.Fld11293_RRRef = T42._IDRRef) AND (T42._Fld595 = ?)
- LEFT OUTER JOIN (SELECT
- T44._IDRRef AS IDRRef,
- T44._Fld3845RRef AS Fld3845RRef,
- T44._Fld595 AS Fld595_
- FROM dbo._Document216 T44
- WHERE ((EXISTS(SELECT
- 1
- FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
- LEFT OUTER JOIN dbo._Reference42 T45
- ON ((T44._Fld3845RRef = T45._IDRRef)) AND (T45._Fld595 = ?)
- WHERE EXISTS(SELECT
- 0x01 AS Q_001_F_000_
- FROM dbo._Reference98 T46
- INNER JOIN dbo._Reference21 T47
- ON (((T46._Fld1685 = ?) AND EXISTS(SELECT
- 0x01 AS Q_004_F_000_
- FROM dbo._InfoRg11709 T48
- WHERE ((T48._Fld595 = ?)) AND ((T48._Fld12065RRef = T46._IDRRef) AND (T48._Fld12066RRef = T47._IDRRef)))) AND T47._IDRRef IN
- (SELECT
- T49._Reference21_IDRRef AS Q_005_F_000RRef
- FROM dbo._Reference21_VT782 T49
- INNER JOIN dbo._InfoRg9937 T50
- ON ((T50._Fld9939_TYPE = 0x08 AND T50._Fld9939_RTRef = 0x00000095 AND T50._Fld9939_RRRef = ?) AND (T50._Fld9938_TYPE = T49._Fld784_TYPE AND T50._Fld9938_RTRef = T49._Fld784_RTRef AND T50._Fld9938_RRRef = T49._Fld784_RRRef))
- WHERE ((T49._Fld595 = ?)) AND (T50._Fld595 = ?)))
- WHERE ((T47._Fld595 = ?)) AND ((CASE WHEN T45._Fld12836RRef IS NULL THEN 0x01 ELSE CASE WHEN T45._Fld12836RRef IS NOT NULL THEN 0x08 END END <> 0x01) AND (CASE WHEN EXISTS(SELECT
- 0x01 AS Q_002_F_000_
- FROM dbo._InfoRg11710 T51
- WHERE ((T51._Fld595 = ?)) AND ((T51._Fld12072RRef = T47._IDRRef) AND (T51._Fld12073_TYPE = CASE WHEN T45._Fld12836RRef IS NOT NULL THEN 0x08 END AND T51._Fld12073_RTRef = CASE WHEN T45._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND T51._Fld12073_RRRef = T45._Fld12836RRef))) THEN 0x01 ELSE 0x00 END = CASE WHEN EXISTS(SELECT
- 0x01 AS Q_003_F_000_
- FROM dbo._InfoRg11715 T52
- WHERE ((T52._Fld595 = ?)) AND ((T52._Fld12199RRef = T47._IDRRef) AND T52._Fld12200_TYPE = CASE WHEN T45._Fld12836RRef IS NOT NULL THEN 0x08 END AND T52._Fld12200_RTRef = CASE WHEN T45._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND (T52._Fld12201 = 0x00))) THEN 0x01 ELSE 0x00 END)))))) AND (T44._Fld595 = ?)) T43
- ON T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D8 AND T1.Fld11293_RRRef = T43.IDRRef
- LEFT OUTER JOIN (SELECT
- T54._IDRRef AS IDRRef,
- T54._Fld3734RRef AS Fld3734RRef,
- T54._Fld595 AS Fld595_
- FROM dbo._Document215 T54
- WHERE ((EXISTS(SELECT
- 1
- FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
- LEFT OUTER JOIN dbo._Reference42 T55
- ON ((T54._Fld3734RRef = T55._IDRRef)) AND (T55._Fld595 = ?)
- WHERE EXISTS(SELECT
- 0x01 AS Q_001_F_000_
- FROM dbo._Reference98 T56
- INNER JOIN dbo._Reference21 T57
- ON (((T56._Fld1685 = ?) AND EXISTS(SELECT
- 0x01 AS Q_004_F_000_
- FROM dbo._InfoRg11709 T58
- WHERE ((T58._Fld595 = ?)) AND ((T58._Fld12065RRef = T56._IDRRef) AND (T58._Fld12066RRef = T57._IDRRef)))) AND T57._IDRRef IN
- (SELECT
- T59._Reference21_IDRRef AS Q_005_F_000RRef
- FROM dbo._Reference21_VT782 T59
- INNER JOIN dbo._InfoRg9937 T60
- ON ((T60._Fld9939_TYPE = 0x08 AND T60._Fld9939_RTRef = 0x00000095 AND T60._Fld9939_RRRef = ?) AND (T60._Fld9938_TYPE = T59._Fld784_TYPE AND T60._Fld9938_RTRef = T59._Fld784_RTRef AND T60._Fld9938_RRRef = T59._Fld784_RRRef))
- WHERE ((T59._Fld595 = ?)) AND (T60._Fld595 = ?)))
- WHERE ((T57._Fld595 = ?)) AND ((CASE WHEN T55._Fld12836RRef IS NULL THEN 0x01 ELSE CASE WHEN T55._Fld12836RRef IS NOT NULL THEN 0x08 END END <> 0x01) AND (CASE WHEN EXISTS(SELECT
- 0x01 AS Q_002_F_000_
- FROM dbo._InfoRg11710 T61
- WHERE ((T61._Fld595 = ?)) AND ((T61._Fld12072RRef = T57._IDRRef) AND (T61._Fld12073_TYPE = CASE WHEN T55._Fld12836RRef IS NOT NULL THEN 0x08 END AND T61._Fld12073_RTRef = CASE WHEN T55._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND T61._Fld12073_RRRef = T55._Fld12836RRef))) THEN 0x01 ELSE 0x00 END = CASE WHEN EXISTS(SELECT
- 0x01 AS Q_003_F_000_
- FROM dbo._InfoRg11715 T62
- WHERE ((T62._Fld595 = ?)) AND ((T62._Fld12199RRef = T57._IDRRef) AND T62._Fld12200_TYPE = CASE WHEN T55._Fld12836RRef IS NOT NULL THEN 0x08 END AND T62._Fld12200_RTRef = CASE WHEN T55._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND (T62._Fld12201 = 0x00))) THEN 0x01 ELSE 0x00 END)))))) AND (T54._Fld595 = ?)) T53
- ON T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D7 AND T1.Fld11293_RRRef = T53.IDRRef
- LEFT OUTER JOIN dbo._Document213 T63
- ON (T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D5 AND T1.Fld11293_RRRef = T63._IDRRef) AND (T63._Fld595 = ?)
- LEFT OUTER JOIN dbo._Document199 T64
- ON (T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000C7 AND T1.Fld11293_RRRef = T64._IDRRef) AND (T64._Fld595 = ?)
- LEFT OUTER JOIN (SELECT
- T66._Folder AS Folder_,
- T66._Fld12836RRef AS Fld12836RRef,
- T66._IDRRef AS IDRRef,
- T66._Fld595 AS Fld595_
- FROM dbo._Reference42 T66
- WHERE ((T66._IDRRef = ?) AND (((T66._Folder = 0x00) OR EXISTS(SELECT
- 0x01 AS Q_001_F_000_
- FROM dbo._Reference98 T67
- INNER JOIN dbo._Reference21 T68
- ON (((T67._Fld1685 = ?) AND EXISTS(SELECT
- 0x01 AS Q_004_F_000_
- FROM dbo._InfoRg11709 T69
- WHERE ((T69._Fld595 = ?)) AND ((T69._Fld12065RRef = T67._IDRRef) AND (T69._Fld12066RRef = T68._IDRRef)))) AND T68._IDRRef IN
- (SELECT
- T70._Reference21_IDRRef AS Q_005_F_000RRef
- FROM dbo._Reference21_VT782 T70
- INNER JOIN dbo._InfoRg9937 T71
- ON ((T71._Fld9939_TYPE = 0x08 AND T71._Fld9939_RTRef = 0x00000095 AND T71._Fld9939_RRRef = ?) AND (T71._Fld9938_TYPE = T70._Fld784_TYPE AND T71._Fld9938_RTRef = T70._Fld784_RTRef AND T71._Fld9938_RRRef = T70._Fld784_RRRef))
- WHERE ((T70._Fld595 = ?)) AND (T71._Fld595 = ?)))
- WHERE ((T68._Fld595 = ?)) AND ((CASE WHEN T66._Fld12836RRef IS NULL THEN 0x01 ELSE CASE WHEN T66._Fld12836RRef IS NOT NULL THEN 0x08 END END <> 0x01) AND (CASE WHEN EXISTS(SELECT
- 0x01 AS Q_002_F_000_
- FROM dbo._InfoRg11710 T72
- WHERE ((T72._Fld595 = ?)) AND ((T72._Fld12072RRef = T68._IDRRef) AND (T72._Fld12073_TYPE = CASE WHEN T66._Fld12836RRef IS NOT NULL THEN 0x08 END AND T72._Fld12073_RTRef = CASE WHEN T66._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND T72._Fld12073_RRRef = T66._Fld12836RRef))) THEN 0x01 ELSE 0x00 END = CASE WHEN EXISTS(SELECT
- 0x01 AS Q_003_F_000_
- FROM dbo._InfoRg11715 T73
- WHERE ((T73._Fld595 = ?)) AND ((T73._Fld12199RRef = T68._IDRRef) AND T73._Fld12200_TYPE = CASE WHEN T66._Fld12836RRef IS NOT NULL THEN 0x08 END AND T73._Fld12200_RTRef = CASE WHEN T66._Fld12836RRef IS NOT NULL THEN 0x0000001C END AND (T73._Fld12201 = 0x00))) THEN 0x01 ELSE 0x00 END)))))) AND (T66._Fld595 = ?)) T65
- ON (T65.IDRRef = CASE WHEN T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000E9 THEN T19.Fld4625RRef WHEN T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D4 THEN T29._Fld3516RRef WHEN T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000EA THEN T30.Fld4774RRef WHEN T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x00000107 THEN T42._Fld6287RRef WHEN T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D8 THEN T43.Fld3845RRef WHEN T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D7 THEN T53.Fld3734RRef WHEN T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D5 THEN T63._Fld3600RRef WHEN T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000C7 THEN T64._Fld2840RRef ELSE CAST(NULL AS BINARY(16)) END)
- LEFT OUTER JOIN dbo._Reference88 T74
- ON (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 AND T1.Fld11290_RRRef = T74._IDRRef) AND (T74._Fld595 = ?)
- LEFT OUTER JOIN dbo._Reference91 T75
- ON (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x0000005B AND T1.Fld11290_RRRef = T75._IDRRef) AND (T75._Fld595 = ?)
- LEFT OUTER JOIN dbo._Reference147 T76
- ON (CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T74._Fld1559RRef ELSE CAST(NULL AS BINARY(16)) END = T76._IDRRef) AND (T76._Fld595 = ?)
- LEFT OUTER JOIN dbo._Reference147 T77
- ON (T74._Fld1559RRef = T77._IDRRef) AND (T77._Fld595 = ?)
- WHERE (T65.IDRRef = ?)
- ",Context='Form.ComposeResult : Report.Sales.Form.ReportFormAdditional
- Report.Sales.ObjectModule : 26 : ResultItem = CompositionProcessor.Next();'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement