Advertisement
bytecoded

Top 3 Query

Nov 4th, 2019
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.71 KB | None | 0 0
  1. 44.610=TotalDurationSec,14.870=AvgDurationSec,3=Execs,,4,Sql="SELECT
  2. T1.Fld11290_TYPE,
  3. T1.Fld11290_RTRef,
  4. T1.Fld11290_RRRef,
  5. T1.Fld11301Turnover_,
  6. T1.Fld11302Turnover_,
  7. CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T74._Fld1559RRef ELSE CAST(NULL AS BINARY(16)) END,
  8. CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T74._Fld1558 ELSE CAST(NULL AS NVARCHAR(35)) END,
  9. 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,
  10. 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,
  11. 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,
  12. 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,
  13. CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T74._Fld1559RRef ELSE CAST(NULL AS BINARY(16)) END,
  14. T76._Description,
  15. CASE WHEN T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 THEN T77._Description ELSE CAST(NULL AS NVARCHAR(25)) END
  16. FROM (SELECT
  17. T2._Fld11293_TYPE AS Fld11293_TYPE,
  18. T2._Fld11293_RTRef AS Fld11293_RTRef,
  19. T2._Fld11293_RRRef AS Fld11293_RRRef,
  20. T2._Fld11290_TYPE AS Fld11290_TYPE,
  21. T2._Fld11290_RTRef AS Fld11290_RTRef,
  22. T2._Fld11290_RRRef AS Fld11290_RRRef,
  23. CAST(SUM(T2._Fld11301) AS NUMERIC(32, 8)) AS Fld11301Turnover_,
  24. CAST(SUM(T2._Fld11302) AS NUMERIC(33, 8)) AS Fld11302Turnover_
  25. FROM dbo._AccumRgTn11305 T2
  26. WHERE (((T2._Fld595 = ?)) AND (EXISTS(SELECT
  27. 1
  28. FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
  29. LEFT OUTER JOIN dbo._Document233 T3
  30. ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000E9 AND T2._Fld11293_RRRef = T3._IDRRef) AND (T3._Fld595 = ?)
  31. LEFT OUTER JOIN dbo._Document212 T4
  32. ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D4 AND T2._Fld11293_RRRef = T4._IDRRef) AND (T4._Fld595 = ?)
  33. LEFT OUTER JOIN dbo._Document234 T5
  34. ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000EA AND T2._Fld11293_RRRef = T5._IDRRef) AND (T5._Fld595 = ?)
  35. LEFT OUTER JOIN dbo._Document263 T6
  36. ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x00000107 AND T2._Fld11293_RRRef = T6._IDRRef) AND (T6._Fld595 = ?)
  37. LEFT OUTER JOIN dbo._Document216 T7
  38. ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D8 AND T2._Fld11293_RRRef = T7._IDRRef) AND (T7._Fld595 = ?)
  39. LEFT OUTER JOIN dbo._Document215 T8
  40. ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D7 AND T2._Fld11293_RRRef = T8._IDRRef) AND (T8._Fld595 = ?)
  41. LEFT OUTER JOIN dbo._Document213 T9
  42. ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000D5 AND T2._Fld11293_RRRef = T9._IDRRef) AND (T9._Fld595 = ?)
  43. LEFT OUTER JOIN dbo._Document199 T10
  44. ON (T2._Fld11293_TYPE = 0x08 AND T2._Fld11293_RTRef = 0x000000C7 AND T2._Fld11293_RRRef = T10._IDRRef) AND (T10._Fld595 = ?)
  45. LEFT OUTER JOIN dbo._Reference42 T11
  46. 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 = ?)
  47. WHERE EXISTS(SELECT
  48. 0x01 AS Q_001_F_000_
  49. FROM dbo._Reference98 T12
  50. INNER JOIN dbo._Reference21 T13
  51. ON (((T12._Fld1685 = ?) AND EXISTS(SELECT
  52. 0x01 AS Q_004_F_000_
  53. FROM dbo._InfoRg11709 T14
  54. WHERE ((T14._Fld595 = ?)) AND ((T14._Fld12065RRef = T12._IDRRef) AND (T14._Fld12066RRef = T13._IDRRef)))) AND T13._IDRRef IN
  55. (SELECT
  56. T15._Reference21_IDRRef AS Q_005_F_000RRef
  57. FROM dbo._Reference21_VT782 T15
  58. INNER JOIN dbo._InfoRg9937 T16
  59. 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))
  60. WHERE ((T15._Fld595 = ?)) AND (T16._Fld595 = ?)))
  61. 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
  62. 0x01 AS Q_002_F_000_
  63. FROM dbo._InfoRg11710 T17
  64. 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
  65. 0x01 AS Q_003_F_000_
  66. FROM dbo._InfoRg11715 T18
  67. 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 <> ?))
  68. GROUP BY T2._Fld11293_TYPE,
  69. T2._Fld11293_RTRef,
  70. T2._Fld11293_RRRef,
  71. T2._Fld11290_TYPE,
  72. T2._Fld11290_RTRef,
  73. T2._Fld11290_RRRef
  74. HAVING (CAST(SUM(T2._Fld11301) AS NUMERIC(32, 8))) <> 0.0 OR (CAST(SUM(T2._Fld11302) AS NUMERIC(33, 8))) <> 0.0) T1
  75. LEFT OUTER JOIN (SELECT
  76. T20._IDRRef AS IDRRef,
  77. T20._Fld4625RRef AS Fld4625RRef,
  78. T20._Fld595 AS Fld595_
  79. FROM dbo._Document233 T20
  80. WHERE ((EXISTS(SELECT
  81. 1
  82. FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
  83. LEFT OUTER JOIN dbo._Reference42 T21
  84. ON ((T20._Fld4625RRef = T21._IDRRef)) AND (T21._Fld595 = ?)
  85. WHERE EXISTS(SELECT
  86. 0x01 AS Q_001_F_000_
  87. FROM dbo._Reference98 T22
  88. INNER JOIN dbo._Reference21 T23
  89. ON (((T22._Fld1685 = ?) AND EXISTS(SELECT
  90. 0x01 AS Q_004_F_000_
  91. FROM dbo._InfoRg11709 T24
  92. WHERE ((T24._Fld595 = ?)) AND ((T24._Fld12065RRef = T22._IDRRef) AND (T24._Fld12066RRef = T23._IDRRef)))) AND T23._IDRRef IN
  93. (SELECT
  94. T25._Reference21_IDRRef AS Q_005_F_000RRef
  95. FROM dbo._Reference21_VT782 T25
  96. INNER JOIN dbo._InfoRg9937 T26
  97. 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))
  98. WHERE ((T25._Fld595 = ?)) AND (T26._Fld595 = ?)))
  99. 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
  100. 0x01 AS Q_002_F_000_
  101. FROM dbo._InfoRg11710 T27
  102. 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
  103. 0x01 AS Q_003_F_000_
  104. FROM dbo._InfoRg11715 T28
  105. 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
  106. ON T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000E9 AND T1.Fld11293_RRRef = T19.IDRRef
  107. LEFT OUTER JOIN dbo._Document212 T29
  108. ON (T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D4 AND T1.Fld11293_RRRef = T29._IDRRef) AND (T29._Fld595 = ?)
  109. LEFT OUTER JOIN (SELECT
  110. T31._IDRRef AS IDRRef,
  111. T31._Fld4774RRef AS Fld4774RRef,
  112. T31._Fld4779RRef AS Fld4779RRef,
  113. T31._Fld595 AS Fld595_
  114. FROM dbo._Document234 T31
  115. WHERE ((EXISTS(SELECT
  116. 1
  117. FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
  118. LEFT OUTER JOIN dbo._Reference42 T32
  119. ON ((T31._Fld4774RRef = T32._IDRRef)) AND (T32._Fld595 = ?)
  120. WHERE EXISTS(SELECT
  121. 0x01 AS Q_001_F_000_
  122. FROM dbo._Reference98 T33
  123. INNER JOIN dbo._Reference21 T34
  124. ON (((T33._Fld1685 = ?) AND EXISTS(SELECT
  125. 0x01 AS Q_006_F_000_
  126. FROM dbo._InfoRg11709 T35
  127. WHERE ((T35._Fld595 = ?)) AND ((T35._Fld12065RRef = T33._IDRRef) AND (T35._Fld12066RRef = T34._IDRRef)))) AND T34._IDRRef IN
  128. (SELECT
  129. T36._Reference21_IDRRef AS Q_007_F_000RRef
  130. FROM dbo._Reference21_VT782 T36
  131. INNER JOIN dbo._InfoRg9937 T37
  132. 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))
  133. WHERE ((T36._Fld595 = ?)) AND (T37._Fld595 = ?)))
  134. WHERE ((T34._Fld595 = ?)) AND ((0x08 <> 0x01) AND (CASE WHEN EXISTS(SELECT
  135. 0x01 AS Q_002_F_000_
  136. FROM dbo._InfoRg11710 T38
  137. 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
  138. 0x01 AS Q_003_F_000_
  139. FROM dbo._InfoRg11715 T39
  140. 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
  141. 0x01 AS Q_004_F_000_
  142. FROM dbo._InfoRg11710 T40
  143. 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
  144. 0x01 AS Q_005_F_000_
  145. FROM dbo._InfoRg11715 T41
  146. 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
  147. ON T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000EA AND T1.Fld11293_RRRef = T30.IDRRef
  148. LEFT OUTER JOIN dbo._Document263 T42
  149. ON (T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x00000107 AND T1.Fld11293_RRRef = T42._IDRRef) AND (T42._Fld595 = ?)
  150. LEFT OUTER JOIN (SELECT
  151. T44._IDRRef AS IDRRef,
  152. T44._Fld3845RRef AS Fld3845RRef,
  153. T44._Fld595 AS Fld595_
  154. FROM dbo._Document216 T44
  155. WHERE ((EXISTS(SELECT
  156. 1
  157. FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
  158. LEFT OUTER JOIN dbo._Reference42 T45
  159. ON ((T44._Fld3845RRef = T45._IDRRef)) AND (T45._Fld595 = ?)
  160. WHERE EXISTS(SELECT
  161. 0x01 AS Q_001_F_000_
  162. FROM dbo._Reference98 T46
  163. INNER JOIN dbo._Reference21 T47
  164. ON (((T46._Fld1685 = ?) AND EXISTS(SELECT
  165. 0x01 AS Q_004_F_000_
  166. FROM dbo._InfoRg11709 T48
  167. WHERE ((T48._Fld595 = ?)) AND ((T48._Fld12065RRef = T46._IDRRef) AND (T48._Fld12066RRef = T47._IDRRef)))) AND T47._IDRRef IN
  168. (SELECT
  169. T49._Reference21_IDRRef AS Q_005_F_000RRef
  170. FROM dbo._Reference21_VT782 T49
  171. INNER JOIN dbo._InfoRg9937 T50
  172. 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))
  173. WHERE ((T49._Fld595 = ?)) AND (T50._Fld595 = ?)))
  174. 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
  175. 0x01 AS Q_002_F_000_
  176. FROM dbo._InfoRg11710 T51
  177. 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
  178. 0x01 AS Q_003_F_000_
  179. FROM dbo._InfoRg11715 T52
  180. 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
  181. ON T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D8 AND T1.Fld11293_RRRef = T43.IDRRef
  182. LEFT OUTER JOIN (SELECT
  183. T54._IDRRef AS IDRRef,
  184. T54._Fld3734RRef AS Fld3734RRef,
  185. T54._Fld595 AS Fld595_
  186. FROM dbo._Document215 T54
  187. WHERE ((EXISTS(SELECT
  188. 1
  189. FROM (SELECT 1 AS SDBL_DUMMY) SDBL_DUAL
  190. LEFT OUTER JOIN dbo._Reference42 T55
  191. ON ((T54._Fld3734RRef = T55._IDRRef)) AND (T55._Fld595 = ?)
  192. WHERE EXISTS(SELECT
  193. 0x01 AS Q_001_F_000_
  194. FROM dbo._Reference98 T56
  195. INNER JOIN dbo._Reference21 T57
  196. ON (((T56._Fld1685 = ?) AND EXISTS(SELECT
  197. 0x01 AS Q_004_F_000_
  198. FROM dbo._InfoRg11709 T58
  199. WHERE ((T58._Fld595 = ?)) AND ((T58._Fld12065RRef = T56._IDRRef) AND (T58._Fld12066RRef = T57._IDRRef)))) AND T57._IDRRef IN
  200. (SELECT
  201. T59._Reference21_IDRRef AS Q_005_F_000RRef
  202. FROM dbo._Reference21_VT782 T59
  203. INNER JOIN dbo._InfoRg9937 T60
  204. 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))
  205. WHERE ((T59._Fld595 = ?)) AND (T60._Fld595 = ?)))
  206. 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
  207. 0x01 AS Q_002_F_000_
  208. FROM dbo._InfoRg11710 T61
  209. 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
  210. 0x01 AS Q_003_F_000_
  211. FROM dbo._InfoRg11715 T62
  212. 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
  213. ON T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D7 AND T1.Fld11293_RRRef = T53.IDRRef
  214. LEFT OUTER JOIN dbo._Document213 T63
  215. ON (T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000D5 AND T1.Fld11293_RRRef = T63._IDRRef) AND (T63._Fld595 = ?)
  216. LEFT OUTER JOIN dbo._Document199 T64
  217. ON (T1.Fld11293_TYPE = 0x08 AND T1.Fld11293_RTRef = 0x000000C7 AND T1.Fld11293_RRRef = T64._IDRRef) AND (T64._Fld595 = ?)
  218. LEFT OUTER JOIN (SELECT
  219. T66._Folder AS Folder_,
  220. T66._Fld12836RRef AS Fld12836RRef,
  221. T66._IDRRef AS IDRRef,
  222. T66._Fld595 AS Fld595_
  223. FROM dbo._Reference42 T66
  224. WHERE ((T66._IDRRef = ?) AND (((T66._Folder = 0x00) OR EXISTS(SELECT
  225. 0x01 AS Q_001_F_000_
  226. FROM dbo._Reference98 T67
  227. INNER JOIN dbo._Reference21 T68
  228. ON (((T67._Fld1685 = ?) AND EXISTS(SELECT
  229. 0x01 AS Q_004_F_000_
  230. FROM dbo._InfoRg11709 T69
  231. WHERE ((T69._Fld595 = ?)) AND ((T69._Fld12065RRef = T67._IDRRef) AND (T69._Fld12066RRef = T68._IDRRef)))) AND T68._IDRRef IN
  232. (SELECT
  233. T70._Reference21_IDRRef AS Q_005_F_000RRef
  234. FROM dbo._Reference21_VT782 T70
  235. INNER JOIN dbo._InfoRg9937 T71
  236. 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))
  237. WHERE ((T70._Fld595 = ?)) AND (T71._Fld595 = ?)))
  238. 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
  239. 0x01 AS Q_002_F_000_
  240. FROM dbo._InfoRg11710 T72
  241. 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
  242. 0x01 AS Q_003_F_000_
  243. FROM dbo._InfoRg11715 T73
  244. 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
  245. 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)
  246. LEFT OUTER JOIN dbo._Reference88 T74
  247. ON (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x00000058 AND T1.Fld11290_RRRef = T74._IDRRef) AND (T74._Fld595 = ?)
  248. LEFT OUTER JOIN dbo._Reference91 T75
  249. ON (T1.Fld11290_TYPE = 0x08 AND T1.Fld11290_RTRef = 0x0000005B AND T1.Fld11290_RRRef = T75._IDRRef) AND (T75._Fld595 = ?)
  250. LEFT OUTER JOIN dbo._Reference147 T76
  251. 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 = ?)
  252. LEFT OUTER JOIN dbo._Reference147 T77
  253. ON (T74._Fld1559RRef = T77._IDRRef) AND (T77._Fld595 = ?)
  254. WHERE (T65.IDRRef = ?)
  255. ",Context='Form.ComposeResult : Report.Sales.Form.ReportFormAdditional
  256. Report.Sales.ObjectModule : 26 : ResultItem = CompositionProcessor.Next();'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement