Advertisement
bytecoded

The Most Hardest Query

Mar 25th, 2019
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 17.65 KB | None | 0 0
  1. (@P1 varbinary(16),@P2 numeric(10),@P3 numeric(10),@P4 varbinary(16),@P5 datetime2(3),@P6 numeric(10),@P7 numeric(10),@P8 numeric(10),@P9 numeric(10),@P10 numeric(10),@P11 numeric(10),@P12 varbinary(16),@P13 datetime2(3),@P14 numeric(10),@P15 numeric(10),@P16 numeric(10),@P17 numeric(10),@P18 varbinary(16),@P19 varbinary(16),@P20 numeric(10),@P21 numeric(10),@P22 numeric(10),@P23 datetime2(3),@P24 datetime2(3),@P25 numeric(10),@P26 numeric(10),@P27 numeric(10),@P28 numeric(10),@P29 datetime2(3),@P30 datetime2(3),@P31 numeric(10),@P32 numeric(10),@P33 varbinary(16),@P34 varbinary(16),@P35 varbinary(16),@P36 varbinary(16),@P37 varbinary(16),@P38 datetime2(3),@P39 datetime2(3),@P40 varbinary(16),@P41 varbinary(16),@P42 numeric(10),@P43 numeric(10),@P44 numeric(10),@P45 datetime2(3),@P46 datetime2(3),@P47 numeric(10),@P48 numeric(10),@P49 numeric(10),@P50 numeric(10),@P51 datetime2(3),@P52 datetime2(3),@P53 numeric(10),@P54 numeric(10),@P55 varbinary(16),@P56 varbinary(16),@P57 varbinary(16),@P58 varbinary(16),@P59 varbinary(16),@P60 datetime2(3),@P61 datetime2(3),@P62 numeric(10),@P63 datetime2(3),@P64 varbinary(16),@P65 numeric(10),@P66 numeric(10),@P67 datetime2(3),@P68 varbinary(16),@P69 numeric(10),@P70 numeric(10),@P71 numeric(10),@P72 numeric(10),@P73 numeric(10),@P74 numeric(10),@P75 numeric(10),@P76 numeric(10),@P77 numeric(10),@P78 numeric(10),@P79 numeric(10),@P80 numeric(10),@P81 numeric(10),@P82 numeric(10),@P83 numeric(10),@P84 numeric(10),@P85 numeric(10),@P86 numeric(10),@P87 numeric(10),@P88 numeric(10),@P89 numeric(10),@P90 numeric(10),@P91 numeric(10),@P92 numeric(10),@P93 numeric(10),@P94 numeric(10),@P95 numeric(10),@P96 numeric(10),@P97 numeric(10),@P98 numeric(10),@P99 numeric(10))SELECT
  2. T1.AccountRRef,
  3. CASE WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000048 THEN T27._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000000B THEN T28._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000039 THEN T29._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000002D THEN T30._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000017 THEN T31._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000018 THEN T32._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000022 THEN T33._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000001B THEN T34._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000041 THEN T35._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000027 THEN T36._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000000A THEN T37._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000003E THEN T38._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00001FBF THEN T39._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000002F THEN T40._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000033 THEN T41._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000053 THEN T42._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000002A THEN T43._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000025 THEN T44._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000042 THEN T45._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000005A THEN T46._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000052 THEN T47._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000028 THEN T48._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000034 THEN T49._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000043 THEN T50._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000002E THEN T51._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000045 THEN T52._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000051 THEN T53._Description WHEN T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000059 THEN T54._Description ELSE CAST(NULL AS NVARCHAR(150)) END,
  4. T1.Value2_TYPE,
  5. T1.Value2_RTRef,
  6. T1.Value2_RRRef,
  7. T1.Fld7827InitialBalance_,
  8. T1.Fld7827Turnover_,
  9. T1.Fld7827FinalBalance_,
  10. T19.Fld7073_,
  11. T23.Fld7073_,
  12. T55._Description,
  13. T56._Description
  14. FROM (SELECT
  15. T2.AccountRRef AS AccountRRef,
  16. T2.Value2_TYPE AS Value2_TYPE,
  17. T2.Value2_RTRef AS Value2_RTRef,
  18. T2.Value2_RRRef AS Value2_RRRef,
  19. T2.Value3_TYPE AS Value3_TYPE,
  20. T2.Value3_RTRef AS Value3_RTRef,
  21. T2.Value3_RRRef AS Value3_RRRef,
  22. CASE WHEN CAST(SUM(T2.Fld7827Turnover_) AS NUMERIC(28, 2)) IS NULL THEN 0.0 ELSE CAST(SUM(T2.Fld7827Turnover_) AS NUMERIC(28, 2)) END AS Fld7827Turnover_,
  23. CASE WHEN CAST(SUM(T2.Fld7827Balance_) AS NUMERIC(27, 2)) IS NULL THEN 0.0 ELSE CAST(SUM(T2.Fld7827Balance_) AS NUMERIC(27, 2)) END AS Fld7827InitialBalance_,
  24. CASE WHEN CAST(SUM(T2.Fld7827Balance_ + T2.Fld7827FinalTurnover_) AS NUMERIC(28, 2)) IS NULL THEN 0.0 ELSE CAST(SUM(T2.Fld7827Balance_ + T2.Fld7827FinalTurnover_) AS NUMERIC(28, 2)) END AS Fld7827FinalBalance_
  25. FROM (SELECT
  26. T3._AccountRRef AS AccountRRef,
  27. T3._Value2_TYPE AS Value2_TYPE,
  28. T3._Value2_RTRef AS Value2_RTRef,
  29. T3._Value2_RRRef AS Value2_RRRef,
  30. CASE WHEN CAST(NULL AS BINARY(1)) IN (0x01) THEN CAST(NULL AS BINARY(1)) END AS Value3_TYPE,
  31. CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN 0x00000000 END AS Value3_RTRef,
  32. CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN @P1 END AS Value3_RRRef,
  33. T3._Fld7827 AS Fld7827Balance_,
  34. T3._Turnover7839 AS Fld7827FinalTurnover_,
  35. T3._TurnoverDt7837 - T3._TurnoverCt7838 AS Fld7827Turnover_
  36. FROM dbo._AccRgAT27856 T3
  37. INNER JOIN #tt5 T4 WITH(NOLOCK)
  38. ON T4._IDRRef = T3._AccountRRef AND T4._Cnt = @P2
  39. WHERE ((T3._Fld11355 = @P3)) AND (((T3._Fld7824RRef = @P4)) AND T3._Period = @P5 AND (T3._Fld7827 <> @P6 OR T3._TurnoverDt7837 <> @P7 OR T3._TurnoverCt7838 <> @P8 OR T3._Turnover7839 <> @P9))
  40. UNION ALL SELECT
  41. T5._AccountRRef AS AccountRRef,
  42. T5._Value2_TYPE AS Value2_TYPE,
  43. T5._Value2_RTRef AS Value2_RTRef,
  44. T5._Value2_RRRef AS Value2_RRRef,
  45. T5._Value3_TYPE AS Value3_TYPE,
  46. T5._Value3_RTRef AS Value3_RTRef,
  47. T5._Value3_RRRef AS Value3_RRRef,
  48. T5._Fld7827 AS Fld7827Balance_,
  49. T5._Turnover7839 AS Fld7827FinalTurnover_,
  50. T5._TurnoverDt7837 - T5._TurnoverCt7838 AS Fld7827Turnover_
  51. FROM dbo._AccRgAT37857 T5
  52. INNER JOIN #tt5 T6 WITH(NOLOCK)
  53. ON T6._IDRRef = T5._AccountRRef AND T6._Cnt = @P10
  54. WHERE ((T5._Fld11355 = @P11)) AND (((T5._Fld7824RRef = @P12)) AND T5._Period = @P13 AND (T5._Fld7827 <> @P14 OR T5._TurnoverDt7837 <> @P15 OR T5._TurnoverCt7838 <> @P16 OR T5._Turnover7839 <> @P17))
  55. UNION ALL SELECT
  56. T7._AccountDtRRef AS AccountRRef,
  57. CASE WHEN T8._ED2 = 0x01 THEN T10._Value_TYPE ELSE CAST(NULL AS BINARY(1)) END AS Value2_TYPE,
  58. CASE WHEN T8._ED2 = 0x01 THEN T10._Value_RTRef ELSE CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN 0x00000000 END END AS Value2_RTRef,
  59. CASE WHEN T8._ED2 = 0x01 THEN T10._Value_RRRef ELSE CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN @P18 END END AS Value2_RRRef,
  60. CASE WHEN T8._ED3 = 0x01 THEN T12._Value_TYPE ELSE CAST(NULL AS BINARY(1)) END AS Value3_TYPE,
  61. CASE WHEN T8._ED3 = 0x01 THEN T12._Value_RTRef ELSE CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN 0x00000000 END END AS Value3_RTRef,
  62. CASE WHEN T8._ED3 = 0x01 THEN T12._Value_RRRef ELSE CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN @P19 END END AS Value3_RRRef,
  63. CAST(0.0 AS NUMERIC(21, 2)) AS Fld7827Balance_,
  64. CAST(CASE WHEN T8._BRF1 = 0x01 THEN T7._Fld7827 ELSE 0.0 END AS NUMERIC(21, 2)) AS Fld7827FinalTurnover_,
  65. CAST(CASE WHEN T8._RF1 = 0x01 THEN T7._Fld7827 ELSE 0.0 END AS NUMERIC(22, 2)) AS Fld7827Turnover_
  66. FROM dbo._AccRg7823 T7
  67. INNER JOIN #tt4 T8 WITH(NOLOCK)
  68. ON T8._IDRRef = T7._AccountDtRRef
  69. LEFT OUTER JOIN dbo._Acc7_ExtDim7816 T9
  70. ON (T9._Acc7_IDRRef = T7._AccountDtRRef AND T9._LineNo = @P20) AND (T9._Fld11355 = @P21)
  71. LEFT OUTER JOIN dbo._AccRgED7859 T10
  72. ON (T10._RecorderTRef = T7._RecorderTRef AND T10._RecorderRRef = T7._RecorderRRef AND T10._LineNo = T7._LineNo AND T10._Period = T7._Period AND T10._Correspond = @P22 AND T10._KindRRef = T9._DimKindRRef AND T10._Period >= @P23 AND T10._Period <= @P24) AND (T10._Fld11355 = @P25)
  73. LEFT OUTER JOIN dbo._Acc7_ExtDim7816 T11
  74. ON (T11._Acc7_IDRRef = T7._AccountDtRRef AND T11._LineNo = @P26) AND (T11._Fld11355 = @P27)
  75. LEFT OUTER JOIN dbo._AccRgED7859 T12
  76. ON (T12._RecorderTRef = T7._RecorderTRef AND T12._RecorderRRef = T7._RecorderRRef AND T12._LineNo = T7._LineNo AND T12._Period = T7._Period AND T12._Correspond = @P28 AND T12._KindRRef = T11._DimKindRRef AND T12._Period >= @P29 AND T12._Period <= @P30) AND (T12._Fld11355 = @P31)
  77. WHERE ((T7._Fld11355 = @P32)) AND (T7._Active = 0x01 AND T7._AccountDtRRef <> @P33 AND (((T7._AccountDtRRef IN (@P34, @P35, @P36)))) AND ((T7._Fld7824RRef = @P37)) AND T7._Period >= @P38 AND T7._Period <= @P39)
  78. UNION ALL SELECT
  79. T13._AccountCtRRef AS AccountRRef,
  80. CASE WHEN T14._ED2 = 0x01 THEN T16._Value_TYPE ELSE CAST(NULL AS BINARY(1)) END AS Value2_TYPE,
  81. CASE WHEN T14._ED2 = 0x01 THEN T16._Value_RTRef ELSE CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN 0x00000000 END END AS Value2_RTRef,
  82. CASE WHEN T14._ED2 = 0x01 THEN T16._Value_RRRef ELSE CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN @P40 END END AS Value2_RRRef,
  83. CASE WHEN T14._ED3 = 0x01 THEN T18._Value_TYPE ELSE CAST(NULL AS BINARY(1)) END AS Value3_TYPE,
  84. CASE WHEN T14._ED3 = 0x01 THEN T18._Value_RTRef ELSE CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN 0x00000000 END END AS Value3_RTRef,
  85. CASE WHEN T14._ED3 = 0x01 THEN T18._Value_RRRef ELSE CASE WHEN CAST(NULL AS BINARY(1)) IS NOT NULL THEN @P41 END END AS Value3_RRRef,
  86. CAST(0.0 AS NUMERIC(21, 2)) AS Fld7827Balance_,
  87. CAST(CASE WHEN T14._BRF1 = 0x01 THEN -T13._Fld7827 ELSE 0.0 END AS NUMERIC(21, 2)) AS Fld7827FinalTurnover_,
  88. CAST(CASE WHEN T14._RF1 = 0x01 THEN -T13._Fld7827 ELSE 0.0 END AS NUMERIC(22, 2)) AS Fld7827Turnover_
  89. FROM dbo._AccRg7823 T13
  90. INNER JOIN #tt4 T14 WITH(NOLOCK)
  91. ON T14._IDRRef = T13._AccountCtRRef
  92. LEFT OUTER JOIN dbo._Acc7_ExtDim7816 T15
  93. ON (T15._Acc7_IDRRef = T13._AccountCtRRef AND T15._LineNo = @P42) AND (T15._Fld11355 = @P43)
  94. LEFT OUTER JOIN dbo._AccRgED7859 T16
  95. ON (T16._RecorderTRef = T13._RecorderTRef AND T16._RecorderRRef = T13._RecorderRRef AND T16._LineNo = T13._LineNo AND T16._Period = T13._Period AND T16._Correspond = @P44 AND T16._KindRRef = T15._DimKindRRef AND T16._Period >= @P45 AND T16._Period <= @P46) AND (T16._Fld11355 = @P47)
  96. LEFT OUTER JOIN dbo._Acc7_ExtDim7816 T17
  97. ON (T17._Acc7_IDRRef = T13._AccountCtRRef AND T17._LineNo = @P48) AND (T17._Fld11355 = @P49)
  98. LEFT OUTER JOIN dbo._AccRgED7859 T18
  99. ON (T18._RecorderTRef = T13._RecorderTRef AND T18._RecorderRRef = T13._RecorderRRef AND T18._LineNo = T13._LineNo AND T18._Period = T13._Period AND T18._Correspond = @P50 AND T18._KindRRef = T17._DimKindRRef AND T18._Period >= @P51 AND T18._Period <= @P52) AND (T18._Fld11355 = @P53)
  100. WHERE ((T13._Fld11355 = @P54)) AND (T13._Active = 0x01 AND T13._AccountCtRRef <> @P55 AND (((T13._AccountCtRRef IN (@P56, @P57, @P58)))) AND ((T13._Fld7824RRef = @P59)) AND T13._Period >= @P60 AND T13._Period <= @P61)) T2
  101. GROUP BY T2.AccountRRef,
  102. T2.Value2_TYPE,
  103. T2.Value2_RTRef,
  104. T2.Value2_RRRef,
  105. T2.Value3_TYPE,
  106. T2.Value3_RTRef,
  107. T2.Value3_RRRef
  108. HAVING (CASE WHEN CAST(SUM(T2.Fld7827Turnover_) AS NUMERIC(28, 2)) IS NULL THEN 0.0 ELSE CAST(SUM(T2.Fld7827Turnover_) AS NUMERIC(28, 2)) END) <> 0.0 OR (CASE WHEN CAST(SUM(T2.Fld7827Balance_) AS NUMERIC(27, 2)) IS NULL THEN 0.0 ELSE CAST(SUM(T2.Fld7827Balance_) AS NUMERIC(27, 2)) END) <> 0.0 OR (CASE WHEN CAST(SUM(T2.Fld7827Balance_ + T2.Fld7827FinalTurnover_) AS NUMERIC(28, 2)) IS NULL THEN 0.0 ELSE CAST(SUM(T2.Fld7827Balance_ + T2.Fld7827FinalTurnover_) AS NUMERIC(28, 2)) END) <> 0.0) T1
  109. LEFT OUTER JOIN (SELECT
  110. T22._Fld7071RRef AS Fld7071RRef,
  111. T22._Fld7072RRef AS Fld7072RRef,
  112. T22._Fld7073 AS Fld7073_
  113. FROM (SELECT
  114. T21._Fld7070RRef AS Fld7070RRef,
  115. T21._Fld7071RRef AS Fld7071RRef,
  116. MAX(T21._Period) AS MAXPERIOD_
  117. FROM dbo._InfoRg7069 T21
  118. WHERE ((T21._Fld11355 = @P62)) AND (T21._Period <= @P63 AND T21._Active = 0x01 AND ((T21._Fld7070RRef = @P64)))
  119. GROUP BY T21._Fld7070RRef,
  120. T21._Fld7071RRef) T20
  121. INNER JOIN dbo._InfoRg7069 T22
  122. ON T20.Fld7070RRef = T22._Fld7070RRef AND T20.Fld7071RRef = T22._Fld7071RRef AND T20.MAXPERIOD_ = T22._Period
  123. WHERE (T22._Fld11355 = @P65)) T19
  124. ON (T1.Value3_TYPE = CASE WHEN T19.Fld7071RRef IS NOT NULL THEN 0x08 END AND T1.Value3_RTRef = CASE WHEN T19.Fld7071RRef IS NOT NULL THEN 0x0000002E END AND T1.Value3_RRRef = T19.Fld7071RRef)
  125. LEFT OUTER JOIN (SELECT
  126. T26._Fld7071RRef AS Fld7071RRef,
  127. T26._Fld7072RRef AS Fld7072RRef,
  128. T26._Fld7073 AS Fld7073_
  129. FROM (SELECT
  130. T25._Fld7070RRef AS Fld7070RRef,
  131. T25._Fld7071RRef AS Fld7071RRef,
  132. MAX(T25._Period) AS MAXPERIOD_
  133. FROM dbo._InfoRg7069 T25
  134. WHERE ((T25._Fld11355 = @P66)) AND (T25._Period <= @P67 AND T25._Active = 0x01 AND ((T25._Fld7070RRef = @P68)))
  135. GROUP BY T25._Fld7070RRef,
  136. T25._Fld7071RRef) T24
  137. INNER JOIN dbo._InfoRg7069 T26
  138. ON T24.Fld7070RRef = T26._Fld7070RRef AND T24.Fld7071RRef = T26._Fld7071RRef AND T24.MAXPERIOD_ = T26._Period
  139. WHERE (T26._Fld11355 = @P69)) T23
  140. ON (T1.Value3_TYPE = CASE WHEN T23.Fld7071RRef IS NOT NULL THEN 0x08 END AND T1.Value3_RTRef = CASE WHEN T23.Fld7071RRef IS NOT NULL THEN 0x0000002E END AND T1.Value3_RRRef = T23.Fld7071RRef)
  141. LEFT OUTER JOIN dbo._Reference72 T27
  142. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000048 AND T1.Value3_RRRef = T27._IDRRef) AND (T27._Fld11355 = @P70)
  143. LEFT OUTER JOIN dbo._Reference11 T28
  144. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000000B AND T1.Value3_RRRef = T28._IDRRef) AND (T28._Fld11355 = @P71)
  145. LEFT OUTER JOIN dbo._Reference57 T29
  146. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000039 AND T1.Value3_RRRef = T29._IDRRef) AND (T29._Fld11355 = @P72)
  147. LEFT OUTER JOIN dbo._Reference45 T30
  148. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000002D AND T1.Value3_RRRef = T30._IDRRef) AND (T30._Fld11355 = @P73)
  149. LEFT OUTER JOIN dbo._Reference23 T31
  150. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000017 AND T1.Value3_RRRef = T31._IDRRef) AND (T31._Fld11355 = @P74)
  151. LEFT OUTER JOIN dbo._Reference24 T32
  152. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000018 AND T1.Value3_RRRef = T32._IDRRef) AND (T32._Fld11355 = @P75)
  153. LEFT OUTER JOIN dbo._Reference34 T33
  154. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000022 AND T1.Value3_RRRef = T33._IDRRef) AND (T33._Fld11355 = @P76)
  155. LEFT OUTER JOIN dbo._Reference27 T34
  156. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000001B AND T1.Value3_RRRef = T34._IDRRef) AND (T34._Fld11355 = @P77)
  157. LEFT OUTER JOIN dbo._Reference65 T35
  158. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000041 AND T1.Value3_RRRef = T35._IDRRef) AND (T35._Fld11355 = @P78)
  159. LEFT OUTER JOIN dbo._Reference39 T36
  160. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000027 AND T1.Value3_RRRef = T36._IDRRef) AND (T36._Fld11355 = @P79)
  161. LEFT OUTER JOIN dbo._Reference10 T37
  162. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000000A AND T1.Value3_RRRef = T37._IDRRef) AND (T37._Fld11355 = @P80)
  163. LEFT OUTER JOIN dbo._Reference62 T38
  164. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000003E AND T1.Value3_RRRef = T38._IDRRef) AND (T38._Fld11355 = @P81)
  165. LEFT OUTER JOIN dbo._Reference8127 T39
  166. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00001FBF AND T1.Value3_RRRef = T39._IDRRef) AND (T39._Fld11355 = @P82)
  167. LEFT OUTER JOIN dbo._Reference47 T40
  168. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000002F AND T1.Value3_RRRef = T40._IDRRef) AND (T40._Fld11355 = @P83)
  169. LEFT OUTER JOIN dbo._Reference51 T41
  170. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000033 AND T1.Value3_RRRef = T41._IDRRef) AND (T41._Fld11355 = @P84)
  171. LEFT OUTER JOIN dbo._Reference83 T42
  172. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000053 AND T1.Value3_RRRef = T42._IDRRef) AND (T42._Fld11355 = @P85)
  173. LEFT OUTER JOIN dbo._Reference42 T43
  174. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000002A AND T1.Value3_RRRef = T43._IDRRef) AND (T43._Fld11355 = @P86)
  175. LEFT OUTER JOIN dbo._Reference37 T44
  176. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000025 AND T1.Value3_RRRef = T44._IDRRef) AND (T44._Fld11355 = @P87)
  177. LEFT OUTER JOIN dbo._Reference66 T45
  178. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000042 AND T1.Value3_RRRef = T45._IDRRef) AND (T45._Fld11355 = @P88)
  179. LEFT OUTER JOIN dbo._Reference90 T46
  180. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000005A AND T1.Value3_RRRef = T46._IDRRef) AND (T46._Fld11355 = @P89)
  181. LEFT OUTER JOIN dbo._Reference82 T47
  182. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000052 AND T1.Value3_RRRef = T47._IDRRef) AND (T47._Fld11355 = @P90)
  183. LEFT OUTER JOIN dbo._Reference40 T48
  184. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000028 AND T1.Value3_RRRef = T48._IDRRef) AND (T48._Fld11355 = @P91)
  185. LEFT OUTER JOIN dbo._Reference52 T49
  186. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000034 AND T1.Value3_RRRef = T49._IDRRef) AND (T49._Fld11355 = @P92)
  187. LEFT OUTER JOIN dbo._Reference67 T50
  188. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000043 AND T1.Value3_RRRef = T50._IDRRef) AND (T50._Fld11355 = @P93)
  189. LEFT OUTER JOIN dbo._Reference46 T51
  190. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x0000002E AND T1.Value3_RRRef = T51._IDRRef) AND (T51._Fld11355 = @P94)
  191. LEFT OUTER JOIN dbo._Reference69 T52
  192. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000045 AND T1.Value3_RRRef = T52._IDRRef) AND (T52._Fld11355 = @P95)
  193. LEFT OUTER JOIN dbo._Reference81 T53
  194. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000051 AND T1.Value3_RRRef = T53._IDRRef) AND (T53._Fld11355 = @P96)
  195. LEFT OUTER JOIN dbo._Reference89 T54
  196. ON (T1.Value3_TYPE = 0x08 AND T1.Value3_RTRef = 0x00000059 AND T1.Value3_RRRef = T54._IDRRef) AND (T54._Fld11355 = @P97)
  197. LEFT OUTER JOIN dbo._Reference12 T55
  198. ON (T19.Fld7072RRef = T55._IDRRef) AND (T55._Fld11355 = @P98)
  199. LEFT OUTER JOIN dbo._Reference12 T56
  200. ON (T23.Fld7072RRef = T56._IDRRef) AND (T56._Fld11355 = @P99)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement