daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?query --
  2. SELECT
  3. T1.Q_001_F_000RRef,
  4. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58884RRef ELSE CAST(NULL AS BINARY(16)) END,
  5. T1.Q_001_F_003RRef,
  6. T1.Q_001_F_004RRef,
  7. T1.Q_001_F_006_,
  8. T1.Q_001_F_013RRef,
  9. T1.Q_001_F_016_,
  10. T1.Q_001_F_017RRef,
  11. T1.Q_001_F_018_,
  12. T1.Q_001_F_019RRef,
  13. (CAST(T1.Q_001_F_006_ AS NUMERIC(24, 3)) * CAST(T1.Q_001_F_016_ AS NUMERIC(13, 2))),
  14. T10.Fld59047RRef,
  15. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58907 ELSE CAST(NULL AS NUMERIC(7, 0)) END,
  16. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49673RRef ELSE CAST(NULL AS BINARY(16)) END,
  17. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58944RRef ELSE CAST(NULL AS BINARY(16)) END,
  18. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T15._Fld58802RRef ELSE CAST(NULL AS BINARY(16)) END,
  19. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld59006RRef ELSE CAST(NULL AS BINARY(16)) END,
  20. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49705RRef ELSE CAST(NULL AS BINARY(16)) END,
  21. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58876RRef ELSE CAST(NULL AS BINARY(16)) END,
  22. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58956RRef ELSE CAST(NULL AS BINARY(16)) END,
  23. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58955RRef ELSE CAST(NULL AS BINARY(16)) END,
  24. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58909RRef ELSE CAST(NULL AS BINARY(16)) END,
  25. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T16._Fld58988RRef ELSE CAST(NULL AS BINARY(16)) END,
  26. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58918RRef ELSE CAST(NULL AS BINARY(16)) END,
  27. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58910RRef ELSE CAST(NULL AS BINARY(16)) END,
  28. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58938RRef ELSE CAST(NULL AS BINARY(16)) END,
  29. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58937RRef ELSE CAST(NULL AS BINARY(16)) END,
  30. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58940RRef ELSE CAST(NULL AS BINARY(16)) END,
  31. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58882RRef ELSE CAST(NULL AS BINARY(16)) END,
  32. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58883RRef ELSE CAST(NULL AS BINARY(16)) END,
  33. T1.Q_001_F_036_,
  34. (T1.Q_001_F_039_ * 1.0),
  35. T1.Q_001_F_040RRef,
  36. (CAST(T1.Q_001_F_006_ AS NUMERIC(24, 3)) * CAST(T1.Q_001_F_039_ AS NUMERIC(13, 2))),
  37. T1.Q_001_F_041_,
  38. T1.Q_001_F_042_,
  39. CASE WHEN T1.Q_001_F_030_TYPE = 0x08 AND T1.Q_001_F_030_RTRef = 0x000002F0 THEN T17._Fld7939RRef WHEN T1.Q_001_F_030_TYPE = 0x08 AND T1.Q_001_F_030_RTRef = 0x000002EF THEN T18._Fld7741RRef WHEN T1.Q_001_F_030_TYPE = 0x08 AND T1.Q_001_F_030_RTRef = 0x000002E6 THEN T19._Fld6931RRef ELSE CAST(NULL AS BINARY(16)) END,
  40. @P1,
  41. T1.Q_001_F_043RRef,
  42. T1.Q_001_F_045_,
  43. CASE WHEN (CASE WHEN T1.Q_001_F_019RRef IS NOT NULL THEN 0x0000002F END = 0x0000002F) THEN T1.Q_001_F_019RRef ELSE T1.Q_001_F_019RRef END,
  44. CASE WHEN (CASE WHEN T1.Q_001_F_019RRef IS NOT NULL THEN 0x0000002F END = 0x0000002F) THEN T20._Description ELSE CAST(NULL AS NVARCHAR(10)) END,
  45. CASE WHEN (CASE WHEN T1.Q_001_F_019RRef IS NOT NULL THEN 0x0000002F END = 0x0000002F) THEN 0.0 ELSE -1.0 END,
  46. CASE WHEN CASE WHEN T1.Q_001_F_019RRef IS NOT NULL THEN 0x0000002F END = 0x0000002F THEN T20._Description ELSE CAST(NULL AS NVARCHAR(10)) END,
  47. CASE WHEN (CASE WHEN T1.Q_001_F_017RRef IS NOT NULL THEN 0x0000002F END = 0x0000002F) THEN T1.Q_001_F_017RRef ELSE T1.Q_001_F_017RRef END,
  48. CASE WHEN (CASE WHEN T1.Q_001_F_017RRef IS NOT NULL THEN 0x0000002F END = 0x0000002F) THEN T21._Description ELSE CAST(NULL AS NVARCHAR(10)) END,
  49. CASE WHEN (CASE WHEN T1.Q_001_F_017RRef IS NOT NULL THEN 0x0000002F END = 0x0000002F) THEN 0.0 ELSE -1.0 END,
  50. CASE WHEN CASE WHEN T1.Q_001_F_017RRef IS NOT NULL THEN 0x0000002F END = 0x0000002F THEN T21._Description ELSE CAST(NULL AS NVARCHAR(10)) END,
  51. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49673RRef ELSE CAST(NULL AS BINARY(16)) END,
  52. T22._Description,
  53. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T23._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  54. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58876RRef ELSE CAST(NULL AS BINARY(16)) END,
  55. T24._Description,
  56. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T25._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  57. T1.Q_001_F_043RRef,
  58. T26._Description,
  59. T26._Description,
  60. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58909RRef ELSE CAST(NULL AS BINARY(16)) END,
  61. T27._Description,
  62. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T16._Description ELSE CAST(NULL AS NVARCHAR(25)) END,
  63. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T28._EnumOrder ELSE CAST(NULL AS NUMERIC(10, 0)) END,
  64. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58937RRef ELSE CAST(NULL AS BINARY(16)) END,
  65. T29._Description,
  66. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T30._Description ELSE CAST(NULL AS NVARCHAR(25)) END,
  67. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58938RRef ELSE CAST(NULL AS BINARY(16)) END,
  68. T31._Description,
  69. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T32._Description ELSE CAST(NULL AS NVARCHAR(25)) END,
  70. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58918RRef ELSE CAST(NULL AS BINARY(16)) END,
  71. T33._Description,
  72. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T34._Description ELSE CAST(NULL AS NVARCHAR(25)) END,
  73. CASE WHEN (CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116) THEN T1.Q_001_F_003RRef ELSE T1.Q_001_F_003RRef END,
  74. CASE WHEN (CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116) THEN T14._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  75. CASE WHEN (CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116) THEN 5.0 ELSE -1.0 END,
  76. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49663 ELSE CAST(NULL AS NVARCHAR(50)) END,
  77. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58890 ELSE CAST(NULL AS NUMERIC(10, 1)) END,
  78. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58891 ELSE CAST(NULL AS NUMERIC(10, 1)) END,
  79. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58904 ELSE CAST(NULL AS DATETIME) END,
  80. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58897RRef ELSE CAST(NULL AS BINARY(16)) END,
  81. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58897RRef ELSE CAST(NULL AS BINARY(16)) END,
  82. T35._Description,
  83. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T36._Description ELSE CAST(NULL AS NVARCHAR(25)) END,
  84. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld63397RRef ELSE CAST(NULL AS BINARY(16)) END,
  85. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld63397RRef ELSE CAST(NULL AS BINARY(16)) END,
  86. T37._Description,
  87. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T38._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  88. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49727RRef ELSE CAST(NULL AS BINARY(16)) END,
  89. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49727RRef ELSE CAST(NULL AS BINARY(16)) END,
  90. T39._Description,
  91. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T40._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  92. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58878RRef ELSE CAST(NULL AS BINARY(16)) END,
  93. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58878RRef ELSE CAST(NULL AS BINARY(16)) END,
  94. T41._Description,
  95. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T42._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  96. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58879RRef ELSE CAST(NULL AS BINARY(16)) END,
  97. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58879RRef ELSE CAST(NULL AS BINARY(16)) END,
  98. T43._Description,
  99. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T44._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  100. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58948RRef ELSE CAST(NULL AS BINARY(16)) END,
  101. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58948RRef ELSE CAST(NULL AS BINARY(16)) END,
  102. T45._Description,
  103. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T46._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  104. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49691RRef ELSE CAST(NULL AS BINARY(16)) END,
  105. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49691RRef ELSE CAST(NULL AS BINARY(16)) END,
  106. T47._Description,
  107. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T48._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  108. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58924RRef ELSE CAST(NULL AS BINARY(16)) END,
  109. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58924RRef ELSE CAST(NULL AS BINARY(16)) END,
  110. T49._Description,
  111. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T50._Description ELSE CAST(NULL AS NVARCHAR(25)) END,
  112. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58930RRef ELSE CAST(NULL AS BINARY(16)) END,
  113. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58930RRef ELSE CAST(NULL AS BINARY(16)) END,
  114. T51._Description,
  115. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T52._Description ELSE CAST(NULL AS NVARCHAR(25)) END,
  116. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  117. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58950RRef ELSE CAST(NULL AS BINARY(16)) END,
  118. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T53._EnumOrder ELSE CAST(NULL AS NUMERIC(10, 0)) END,
  119. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58896 ELSE CAST(NULL AS NUMERIC(10, 0)) END,
  120. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58951RRef ELSE CAST(NULL AS BINARY(16)) END,
  121. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58951RRef ELSE CAST(NULL AS BINARY(16)) END,
  122. T54._Description,
  123. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T55._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  124. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58905RRef ELSE CAST(NULL AS BINARY(16)) END,
  125. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T56._EnumOrder ELSE CAST(NULL AS NUMERIC(10, 0)) END,
  126. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58942RRef ELSE CAST(NULL AS BINARY(16)) END,
  127. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58942RRef ELSE CAST(NULL AS BINARY(16)) END,
  128. T57._Description,
  129. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T58._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  130. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49706RRef ELSE CAST(NULL AS BINARY(16)) END,
  131. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49706RRef ELSE CAST(NULL AS BINARY(16)) END,
  132. T59._Description,
  133. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T60._Description ELSE CAST(NULL AS NVARCHAR(150)) END,
  134. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T61._Fld58812 ELSE CAST(NULL AS NVARCHAR(50)) END,
  135. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58947RRef ELSE CAST(NULL AS BINARY(16)) END,
  136. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58947RRef ELSE CAST(NULL AS BINARY(16)) END,
  137. T62._Description,
  138. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T63._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  139. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58957RRef ELSE CAST(NULL AS BINARY(16)) END,
  140. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T64._EnumOrder ELSE CAST(NULL AS NUMERIC(10, 0)) END,
  141. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49721RRef ELSE CAST(NULL AS BINARY(16)) END,
  142. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49721RRef ELSE CAST(NULL AS BINARY(16)) END,
  143. T65._Description,
  144. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T66._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  145. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58944RRef ELSE CAST(NULL AS BINARY(16)) END,
  146. T67._Description,
  147. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T68._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  148. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58884RRef ELSE CAST(NULL AS BINARY(16)) END,
  149. T69._Description,
  150. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T70._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  151. CASE WHEN (CASE WHEN T1.Q_001_F_013RRef IS NOT NULL THEN 0x0000021D END = 0x0000021D) THEN T1.Q_001_F_013RRef ELSE T1.Q_001_F_013RRef END,
  152. CASE WHEN (CASE WHEN T1.Q_001_F_013RRef IS NOT NULL THEN 0x0000021D END = 0x0000021D) THEN T71._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  153. CASE WHEN (CASE WHEN T1.Q_001_F_013RRef IS NOT NULL THEN 0x0000021D END = 0x0000021D) THEN 15.0 ELSE -1.0 END,
  154. CASE WHEN CASE WHEN T1.Q_001_F_013RRef IS NOT NULL THEN 0x0000021D END = 0x0000021D THEN T71._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  155. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58883RRef ELSE CAST(NULL AS BINARY(16)) END,
  156. T72._Description,
  157. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T73._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  158. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld59006RRef ELSE CAST(NULL AS BINARY(16)) END,
  159. T74._Description,
  160. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T75._Description ELSE CAST(NULL AS NVARCHAR(25)) END,
  161. T76._EnumOrder,
  162. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58955RRef ELSE CAST(NULL AS BINARY(16)) END,
  163. T77._Description,
  164. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T78._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  165. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58956RRef ELSE CAST(NULL AS BINARY(16)) END,
  166. T79._Description,
  167. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T80._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  168. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58882RRef ELSE CAST(NULL AS BINARY(16)) END,
  169. T81._Description,
  170. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T82._Description ELSE CAST(NULL AS NVARCHAR(60)) END,
  171. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58940RRef ELSE CAST(NULL AS BINARY(16)) END,
  172. T83._Description,
  173. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T84._Description ELSE CAST(NULL AS NVARCHAR(50)) END,
  174. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T85._EnumOrder ELSE CAST(NULL AS NUMERIC(10, 0)) END,
  175. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49705RRef ELSE CAST(NULL AS BINARY(16)) END,
  176. T86._Description,
  177. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T87._Description ELSE CAST(NULL AS NVARCHAR(100)) END,
  178. T88._Description,
  179. T88._Fld59007,
  180. T88._Description,
  181. CASE WHEN (CASE WHEN T1.Q_001_F_004RRef IS NOT NULL THEN 0x00000276 END = 0x00000276) THEN T1.Q_001_F_004RRef ELSE T1.Q_001_F_004RRef END,
  182. CASE WHEN (CASE WHEN T1.Q_001_F_004RRef IS NOT NULL THEN 0x00000276 END = 0x00000276) THEN T89._Description ELSE CAST(NULL AS NVARCHAR(150)) END,
  183. CASE WHEN (CASE WHEN T1.Q_001_F_004RRef IS NOT NULL THEN 0x00000276 END = 0x00000276) THEN 24.0 ELSE -1.0 END,
  184. CASE WHEN CASE WHEN T1.Q_001_F_004RRef IS NOT NULL THEN 0x00000276 END = 0x00000276 THEN T89._Fld58858 ELSE CAST(NULL AS NUMERIC(10, 0)) END,
  185. CASE WHEN CASE WHEN T1.Q_001_F_004RRef IS NOT NULL THEN 0x00000276 END = 0x00000276 THEN T89._Description ELSE CAST(NULL AS NVARCHAR(150)) END,
  186. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58910RRef ELSE CAST(NULL AS BINARY(16)) END,
  187. T90._Description,
  188. CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T91._Description ELSE CAST(NULL AS NVARCHAR(25)) END
  189. FROM (SELECT
  190. T2._Q_001_F_001RRef AS Q_001_F_000RRef,
  191. T3._Fld58884RRef AS Q_001_F_001RRef,
  192. T2._Q_001_F_002RRef AS Q_001_F_002RRef,
  193. T2._Q_001_F_000RRef AS Q_001_F_003RRef,
  194. T2._Q_001_F_003RRef AS Q_001_F_004RRef,
  195. T2._Q_001_F_004RRef AS Q_001_F_005RRef,
  196. T2._Q_001_F_005 AS Q_001_F_006_,
  197. T2._Q_001_F_006 AS Q_001_F_007_,
  198. T2._Q_001_F_007 AS Q_001_F_008_,
  199. T2._Q_001_F_008 AS Q_001_F_009_,
  200. T2._Q_001_F_009 AS Q_001_F_010_,
  201. T2._Q_001_F_010 AS Q_001_F_011_,
  202. T2._Q_001_F_011RRef AS Q_001_F_012RRef,
  203. T2._Q_001_F_012RRef AS Q_001_F_013RRef,
  204. CASE WHEN T2._Q_001_F_019_TYPE = 0x03 THEN T2._Q_001_F_019_N END AS Q_001_F_014_,
  205. T2._Q_001_F_020_TYPE AS Q_001_F_015_TYPE,
  206. T2._Q_001_F_020_L AS Q_001_F_015_L,
  207. T2._Q_001_F_020_N AS Q_001_F_015_N,
  208. T2._Q_001_F_020_T AS Q_001_F_015_T,
  209. T2._Q_001_F_020_S AS Q_001_F_015_S,
  210. T2._Q_001_F_020_B AS Q_001_F_015_B,
  211. T2._Q_001_F_020_RTRef AS Q_001_F_015_RTRef,
  212. T2._Q_001_F_020_RRRef AS Q_001_F_015_RRRef,
  213. T2._Q_001_F_021 AS Q_001_F_016_,
  214. T2._Q_001_F_022RRef AS Q_001_F_017RRef,
  215. T2._Q_001_F_023 AS Q_001_F_018_,
  216. T2._Q_001_F_024RRef AS Q_001_F_019RRef,
  217. CAST(NULL AS BINARY(16)) AS Q_001_F_020RRef,
  218. CAST(0.0 AS NUMERIC(10, 2)) AS Q_001_F_021_,
  219. CAST(0.0 AS NUMERIC(7, 0)) AS Q_001_F_022_,
  220. 0.0 AS Q_001_F_023_,
  221. 0.0 AS Q_001_F_024_,
  222. CAST(0.0 AS NUMERIC(10, 2)) AS Q_001_F_025_,
  223. CAST(0.0 AS NUMERIC(12, 0)) AS Q_001_F_026_,
  224. CAST(NULL AS BINARY(16)) AS Q_001_F_027RRef,
  225. CAST(NULL AS BINARY(16)) AS Q_001_F_028RRef,
  226. CAST(NULL AS BINARY(16)) AS Q_001_F_029RRef,
  227. T2._Q_001_F_013_TYPE AS Q_001_F_030_TYPE,
  228. T2._Q_001_F_013_RTRef AS Q_001_F_030_RTRef,
  229. T2._Q_001_F_013_RRRef AS Q_001_F_030_RRRef,
  230. CASE WHEN T2._Q_001_F_019_TYPE = 0x03 THEN T2._Q_001_F_019_N END AS Q_001_F_031_,
  231. CASE WHEN T2._Q_001_F_020_TYPE = 0x03 THEN T2._Q_001_F_020_N END AS Q_001_F_032_,
  232. T2._Q_001_F_025_TYPE AS Q_001_F_033_TYPE,
  233. T2._Q_001_F_025_L AS Q_001_F_033_L,
  234. T2._Q_001_F_025_N AS Q_001_F_033_N,
  235. T2._Q_001_F_025_T AS Q_001_F_033_T,
  236. T2._Q_001_F_025_S AS Q_001_F_033_S,
  237. T2._Q_001_F_025_B AS Q_001_F_033_B,
  238. T2._Q_001_F_025_RTRef AS Q_001_F_033_RTRef,
  239. T2._Q_001_F_025_RRRef AS Q_001_F_033_RRRef,
  240. T2._Q_001_F_026_TYPE AS Q_001_F_034_TYPE,
  241. T2._Q_001_F_026_L AS Q_001_F_034_L,
  242. T2._Q_001_F_026_N AS Q_001_F_034_N,
  243. T2._Q_001_F_026_T AS Q_001_F_034_T,
  244. T2._Q_001_F_026_S AS Q_001_F_034_S,
  245. T2._Q_001_F_026_B AS Q_001_F_034_B,
  246. T2._Q_001_F_026_RTRef AS Q_001_F_034_RTRef,
  247. T2._Q_001_F_026_RRRef AS Q_001_F_034_RRRef,
  248. T2._Q_001_F_027_TYPE AS Q_001_F_035_TYPE,
  249. T2._Q_001_F_027_L AS Q_001_F_035_L,
  250. T2._Q_001_F_027_N AS Q_001_F_035_N,
  251. T2._Q_001_F_027_T AS Q_001_F_035_T,
  252. T2._Q_001_F_027_S AS Q_001_F_035_S,
  253. T2._Q_001_F_027_B AS Q_001_F_035_B,
  254. T2._Q_001_F_027_RTRef AS Q_001_F_035_RTRef,
  255. T2._Q_001_F_027_RRRef AS Q_001_F_035_RRRef,
  256. T2._Q_001_F_014 AS Q_001_F_036_,
  257. T2._Q_001_F_015 AS Q_001_F_037_,
  258. T2._Q_001_F_016 AS Q_001_F_038_,
  259. T2._Q_001_F_028 AS Q_001_F_039_,
  260. T2._Q_001_F_029RRef AS Q_001_F_040RRef,
  261. T2._Q_001_F_017 AS Q_001_F_041_,
  262. T2._Q_001_F_018 AS Q_001_F_042_,
  263. T2._Q_001_F_030RRef AS Q_001_F_043RRef,
  264. @P2 AS Q_001_F_044_,
  265. T2._Q_001_F_031 AS Q_001_F_045_
  266. FROM #tt13 T2 WITH(NOLOCK)
  267. LEFT OUTER JOIN dbo._Reference278X1 T3
  268. ON (T2._Q_001_F_000RRef = T3._IDRRef) AND (T3._Fld2118 = @P3)
  269. UNION ALL SELECT
  270. T6._Fld58880RRef AS Fld58880RRef,
  271. T6._Fld58884RRef AS Fld58884RRef,
  272. T6._Fld58879RRef AS Fld58879RRef,
  273. T4._Q_001_F_000RRef AS Q_001_F_000RRef,
  274. T5._Q_001_F_001RRef AS Q_001_F_001RRef,
  275. CAST(NULL AS BINARY(16)),
  276. CAST(0.0 AS NUMERIC(29, 3)),
  277. CAST(0.0 AS NUMERIC(7, 0)),
  278. CAST(0.0 AS NUMERIC(7, 0)),
  279. CAST(0.0 AS NUMERIC(7, 0)),
  280. CAST(0.0 AS NUMERIC(10, 6)),
  281. CAST(0.0 AS NUMERIC(15, 3)),
  282. CAST(NULL AS BINARY(16)),
  283. CAST(NULL AS BINARY(16)),
  284. 0.0,
  285. CAST(NULL AS BINARY(1)),
  286. CAST(NULL AS BINARY(1)),
  287. CAST(NULL AS NUMERIC(38,8)),
  288. CAST(NULL AS DATETIME),
  289. CAST(NULL AS NVARCHAR),
  290. CAST(NULL AS VARBINARY),
  291. CAST(NULL AS BINARY(4)),
  292. CAST(NULL AS BINARY(16)),
  293. CAST(0.0 AS NUMERIC(15, 2)),
  294. CAST(NULL AS BINARY(16)),
  295. CAST(0.0 AS NUMERIC(15, 2)),
  296. CAST(NULL AS BINARY(16)),
  297. T4._Q_001_F_001RRef AS Q_001_F_001RRef,
  298. T4._Q_001_F_002 AS Q_001_F_002_,
  299. T4._Q_001_F_003 AS Q_001_F_003_,
  300. T4._Q_001_F_004 AS Q_001_F_004_,
  301. T4._Q_001_F_005 AS Q_001_F_005_,
  302. T4._Q_001_F_006 AS Q_001_F_006_,
  303. T4._Q_001_F_007 AS Q_001_F_007_,
  304. CAST(NULL AS BINARY(16)),
  305. CAST(NULL AS BINARY(16)),
  306. CAST(NULL AS BINARY(16)),
  307. CAST(NULL AS BINARY(1)),
  308. CAST(NULL AS BINARY(4)),
  309. CAST(NULL AS BINARY(16)),
  310. 0.0,
  311. 0.0,
  312. CAST(NULL AS BINARY(1)),
  313. CAST(NULL AS BINARY(1)),
  314. CAST(NULL AS NUMERIC(38,8)),
  315. CAST(NULL AS DATETIME),
  316. CAST(NULL AS NVARCHAR),
  317. CAST(NULL AS VARBINARY),
  318. CAST(NULL AS BINARY(4)),
  319. CAST(NULL AS BINARY(16)),
  320. CAST(NULL AS BINARY(1)),
  321. CAST(NULL AS BINARY(1)),
  322. CAST(NULL AS NUMERIC(38,8)),
  323. CAST(NULL AS DATETIME),
  324. CAST(NULL AS NVARCHAR),
  325. CAST(NULL AS VARBINARY),
  326. CAST(NULL AS BINARY(4)),
  327. CAST(NULL AS BINARY(16)),
  328. CAST(NULL AS BINARY(1)),
  329. CAST(NULL AS BINARY(1)),
  330. CAST(NULL AS NUMERIC(38,8)),
  331. CAST(NULL AS DATETIME),
  332. CAST(NULL AS NVARCHAR),
  333. CAST(NULL AS VARBINARY),
  334. CAST(NULL AS BINARY(4)),
  335. CAST(NULL AS BINARY(16)),
  336. CAST(0.0 AS NUMERIC(27, 3)),
  337. CAST(0.0 AS NUMERIC(27, 3)),
  338. CAST(0.0 AS NUMERIC(28, 3)),
  339. CAST(NULL AS NUMERIC(15, 2)),
  340. CAST(NULL AS BINARY(16)),
  341. CAST(NULL AS NUMERIC(15, 2)),
  342. CAST(NULL AS NUMERIC(21, 2)),
  343. T7._Q_001_F_003RRef AS Q_001_F_003RRef,
  344. CAST(@P4 AS NVARCHAR(23)),
  345. CAST(0.0 AS NUMERIC(15, 3))
  346. FROM #tt16 T4 WITH(NOLOCK)
  347. LEFT OUTER JOIN #tt20 T5 WITH(NOLOCK)
  348. ON (T4._Q_001_F_000RRef = T5._Q_001_F_000RRef)
  349. LEFT OUTER JOIN dbo._Reference278X1 T6
  350. ON (T4._Q_001_F_000RRef = T6._IDRRef) AND (T6._Fld2118 = @P5)
  351. LEFT OUTER JOIN #tt3 T7 WITH(NOLOCK)
  352. ON (T6._Fld58884RRef = T7._Q_001_F_000RRef)
  353. WHERE ((T7._Q_001_F_003RRef IN (@P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20, @P21, @P22, @P23, @P24, @P25, @P26, @P27, @P28, @P29)))
  354. UNION ALL SELECT
  355. T8._Q_001_F_001RRef AS Q_001_F_001RRef,
  356. T8._Q_001_F_002RRef AS Q_001_F_002RRef,
  357. CAST(NULL AS BINARY(16)),
  358. CAST(NULL AS BINARY(16)),
  359. CAST(NULL AS BINARY(16)),
  360. CAST(NULL AS BINARY(16)),
  361. CAST(NULL AS NUMERIC(29, 3)),
  362. CAST(NULL AS NUMERIC(7, 0)),
  363. CAST(NULL AS NUMERIC(7, 0)),
  364. CAST(NULL AS NUMERIC(7, 0)),
  365. CAST(NULL AS NUMERIC(10, 6)),
  366. CAST(NULL AS NUMERIC(15, 3)),
  367. CAST(NULL AS BINARY(16)),
  368. CAST(NULL AS BINARY(16)),
  369. 0.0,
  370. CAST(NULL AS BINARY(1)),
  371. CAST(NULL AS BINARY(1)),
  372. CAST(NULL AS NUMERIC(38,8)),
  373. CAST(NULL AS DATETIME),
  374. CAST(NULL AS NVARCHAR),
  375. CAST(NULL AS VARBINARY),
  376. CAST(NULL AS BINARY(4)),
  377. CAST(NULL AS BINARY(16)),
  378. CAST(0.0 AS NUMERIC(15, 2)),
  379. CAST(NULL AS BINARY(16)),
  380. CAST(0.0 AS NUMERIC(15, 2)),
  381. CAST(NULL AS BINARY(16)),
  382. CAST(NULL AS BINARY(16)),
  383. CAST(0.0 AS NUMERIC(10, 2)),
  384. CAST(0.0 AS NUMERIC(7, 0)),
  385. 0.0,
  386. 0.0,
  387. CAST(0.0 AS NUMERIC(10, 2)),
  388. CAST(0.0 AS NUMERIC(12, 0)),
  389. T8._Q_001_F_000RRef AS Q_001_F_000RRef,
  390. T8._Q_001_F_003RRef AS Q_001_F_003RRef,
  391. T8._Q_001_F_004RRef AS Q_001_F_004RRef,
  392. CAST(NULL AS BINARY(1)),
  393. CAST(NULL AS BINARY(4)),
  394. CAST(NULL AS BINARY(16)),
  395. 0.0,
  396. 0.0,
  397. CAST(NULL AS BINARY(1)),
  398. CAST(NULL AS BINARY(1)),
  399. CAST(NULL AS NUMERIC(38,8)),
  400. CAST(NULL AS DATETIME),
  401. CAST(NULL AS NVARCHAR),
  402. CAST(NULL AS VARBINARY),
  403. CAST(NULL AS BINARY(4)),
  404. CAST(NULL AS BINARY(16)),
  405. CAST(NULL AS BINARY(1)),
  406. CAST(NULL AS BINARY(1)),
  407. CAST(NULL AS NUMERIC(38,8)),
  408. CAST(NULL AS DATETIME),
  409. CAST(NULL AS NVARCHAR),
  410. CAST(NULL AS VARBINARY),
  411. CAST(NULL AS BINARY(4)),
  412. CAST(NULL AS BINARY(16)),
  413. CAST(NULL AS BINARY(1)),
  414. CAST(NULL AS BINARY(1)),
  415. CAST(NULL AS NUMERIC(38,8)),
  416. CAST(NULL AS DATETIME),
  417. CAST(NULL AS NVARCHAR),
  418. CAST(NULL AS VARBINARY),
  419. CAST(NULL AS BINARY(4)),
  420. CAST(NULL AS BINARY(16)),
  421. CAST(0.0 AS NUMERIC(27, 3)),
  422. CAST(0.0 AS NUMERIC(27, 3)),
  423. CAST(0.0 AS NUMERIC(28, 3)),
  424. CAST(NULL AS NUMERIC(15, 2)),
  425. CAST(NULL AS BINARY(16)),
  426. CAST(NULL AS NUMERIC(15, 2)),
  427. CAST(NULL AS NUMERIC(21, 2)),
  428. T9._Fld59014RRef AS Fld59014RRef,
  429. CAST(@P30 AS NVARCHAR(23)),
  430. CAST(0.0 AS NUMERIC(15, 3))
  431. FROM #tt19 T8 WITH(NOLOCK)
  432. LEFT OUTER JOIN dbo._Reference541X1 T9
  433. ON (T8._Q_001_F_002RRef = T9._IDRRef) AND (T9._Fld2118 = @P31)
  434. WHERE ((T9._Fld59014RRef IN (@P32, @P33, @P34, @P35, @P36, @P37, @P38, @P39, @P40, @P41, @P42, @P43, @P44, @P45, @P46, @P47, @P48, @P49, @P50, @P51, @P52, @P53, @P54, @P55)))) T1
  435. LEFT OUTER JOIN (SELECT
  436. T13._Fld59045RRef AS Fld59045RRef,
  437. T13._Fld59046RRef AS Fld59046RRef,
  438. T13._Fld59047RRef AS Fld59047RRef
  439. FROM (SELECT
  440. T12._Fld59045RRef AS Fld59045RRef,
  441. T12._Fld59046RRef AS Fld59046RRef,
  442. MAX(T12._Period) AS MAXPERIOD_
  443. FROM dbo._InfoRg59044X1 T12
  444. GROUP BY T12._Fld59045RRef,
  445. T12._Fld59046RRef) T11
  446. INNER JOIN dbo._InfoRg59044X1 T13
  447. ON T11.Fld59045RRef = T13._Fld59045RRef AND T11.Fld59046RRef = T13._Fld59046RRef AND T11.MAXPERIOD_ = T13._Period) T10
  448. ON ((T1.Q_001_F_003RRef = T10.Fld59045RRef) AND (T1.Q_001_F_002RRef = T10.Fld59046RRef))
  449. LEFT OUTER JOIN dbo._Reference278X1 T14
  450. ON (T1.Q_001_F_003RRef = T14._IDRRef) AND (T14._Fld2118 = @P56)
  451. LEFT OUTER JOIN dbo._Reference58745X1 T15
  452. ON T14._Fld58873RRef = T15._IDRRef
  453. LEFT OUTER JOIN dbo._Reference58740X1 T16
  454. ON T14._Fld58909RRef = T16._IDRRef
  455. LEFT OUTER JOIN dbo._Document752X1 T17
  456. ON (T1.Q_001_F_030_TYPE = 0x08 AND T1.Q_001_F_030_RTRef = 0x000002F0 AND T1.Q_001_F_030_RRRef = T17._IDRRef) AND (T17._Fld2118 = @P57)
  457. LEFT OUTER JOIN dbo._Document751 T18
  458. ON (T1.Q_001_F_030_TYPE = 0x08 AND T1.Q_001_F_030_RTRef = 0x000002EF AND T1.Q_001_F_030_RRRef = T18._IDRRef) AND (T18._Fld2118 = @P58)
  459. LEFT OUTER JOIN dbo._Document742 T19
  460. ON (T1.Q_001_F_030_TYPE = 0x08 AND T1.Q_001_F_030_RTRef = 0x000002E6 AND T1.Q_001_F_030_RRRef = T19._IDRRef) AND (T19._Fld2118 = @P59)
  461. LEFT OUTER JOIN dbo._Reference47 T20
  462. ON (T1.Q_001_F_019RRef = T20._IDRRef) AND (T20._Fld2118 = @P60)
  463. LEFT OUTER JOIN dbo._Reference47 T21
  464. ON (T1.Q_001_F_017RRef = T21._IDRRef) AND (T21._Fld2118 = @P61)
  465. LEFT OUTER JOIN dbo._Reference84X1 T22
  466. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49673RRef ELSE CAST(NULL AS BINARY(16)) END = T22._IDRRef) AND (T22._Fld2118 = @P62)
  467. LEFT OUTER JOIN dbo._Reference84X1 T23
  468. ON (T14._Fld49673RRef = T23._IDRRef) AND (T23._Fld2118 = @P63)
  469. LEFT OUTER JOIN dbo._Reference58735X1 T24
  470. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58876RRef ELSE CAST(NULL AS BINARY(16)) END = T24._IDRRef
  471. LEFT OUTER JOIN dbo._Reference58735X1 T25
  472. ON T14._Fld58876RRef = T25._IDRRef
  473. LEFT OUTER JOIN dbo._Reference250X1 T26
  474. ON (T1.Q_001_F_043RRef = T26._IDRRef) AND (T26._Fld2118 = @P64)
  475. LEFT OUTER JOIN dbo._Reference58740X1 T27
  476. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58909RRef ELSE CAST(NULL AS BINARY(16)) END = T27._IDRRef
  477. LEFT OUTER JOIN dbo._Enum58987X1 T28
  478. ON T16._Fld58988RRef = T28._IDRRef
  479. LEFT OUTER JOIN dbo._Reference58740X1 T29
  480. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58937RRef ELSE CAST(NULL AS BINARY(16)) END = T29._IDRRef
  481. LEFT OUTER JOIN dbo._Reference58740X1 T30
  482. ON T14._Fld58937RRef = T30._IDRRef
  483. LEFT OUTER JOIN dbo._Reference58740X1 T31
  484. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58938RRef ELSE CAST(NULL AS BINARY(16)) END = T31._IDRRef
  485. LEFT OUTER JOIN dbo._Reference58740X1 T32
  486. ON T14._Fld58938RRef = T32._IDRRef
  487. LEFT OUTER JOIN dbo._Reference58740X1 T33
  488. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58918RRef ELSE CAST(NULL AS BINARY(16)) END = T33._IDRRef
  489. LEFT OUTER JOIN dbo._Reference58740X1 T34
  490. ON T14._Fld58918RRef = T34._IDRRef
  491. LEFT OUTER JOIN dbo._Reference58733X1 T35
  492. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58897RRef ELSE CAST(NULL AS BINARY(16)) END = T35._IDRRef
  493. LEFT OUTER JOIN dbo._Reference58733X1 T36
  494. ON T14._Fld58897RRef = T36._IDRRef
  495. LEFT OUTER JOIN dbo._Reference626 T37
  496. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld63397RRef ELSE CAST(NULL AS BINARY(16)) END = T37._IDRRef) AND (T37._Fld2118 = @P65)
  497. LEFT OUTER JOIN dbo._Reference626 T38
  498. ON (T14._Fld63397RRef = T38._IDRRef) AND (T38._Fld2118 = @P66)
  499. LEFT OUTER JOIN dbo._Reference234X1 T39
  500. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49727RRef ELSE CAST(NULL AS BINARY(16)) END = T39._IDRRef) AND (T39._Fld2118 = @P67)
  501. LEFT OUTER JOIN dbo._Reference234X1 T40
  502. ON (T14._Fld49727RRef = T40._IDRRef) AND (T40._Fld2118 = @P68)
  503. LEFT OUTER JOIN dbo._Reference234X1 T41
  504. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58878RRef ELSE CAST(NULL AS BINARY(16)) END = T41._IDRRef) AND (T41._Fld2118 = @P69)
  505. LEFT OUTER JOIN dbo._Reference234X1 T42
  506. ON (T14._Fld58878RRef = T42._IDRRef) AND (T42._Fld2118 = @P70)
  507. LEFT OUTER JOIN dbo._Reference234X1 T43
  508. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58879RRef ELSE CAST(NULL AS BINARY(16)) END = T43._IDRRef) AND (T43._Fld2118 = @P71)
  509. LEFT OUTER JOIN dbo._Reference234X1 T44
  510. ON (T14._Fld58879RRef = T44._IDRRef) AND (T44._Fld2118 = @P72)
  511. LEFT OUTER JOIN dbo._Reference58867X1 T45
  512. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58948RRef ELSE CAST(NULL AS BINARY(16)) END = T45._IDRRef
  513. LEFT OUTER JOIN dbo._Reference58867X1 T46
  514. ON T14._Fld58948RRef = T46._IDRRef
  515. LEFT OUTER JOIN dbo._Reference250X1 T47
  516. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49691RRef ELSE CAST(NULL AS BINARY(16)) END = T47._IDRRef) AND (T47._Fld2118 = @P73)
  517. LEFT OUTER JOIN dbo._Reference250X1 T48
  518. ON (T14._Fld49691RRef = T48._IDRRef) AND (T48._Fld2118 = @P74)
  519. LEFT OUTER JOIN dbo._Reference58740X1 T49
  520. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58924RRef ELSE CAST(NULL AS BINARY(16)) END = T49._IDRRef
  521. LEFT OUTER JOIN dbo._Reference58740X1 T50
  522. ON T14._Fld58924RRef = T50._IDRRef
  523. LEFT OUTER JOIN dbo._Reference58740X1 T51
  524. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58930RRef ELSE CAST(NULL AS BINARY(16)) END = T51._IDRRef
  525. LEFT OUTER JOIN dbo._Reference58740X1 T52
  526. ON T14._Fld58930RRef = T52._IDRRef
  527. LEFT OUTER JOIN dbo._Enum59210X1 T53
  528. ON T14._Fld58950RRef = T53._IDRRef
  529. LEFT OUTER JOIN dbo._Reference58869X1 T54
  530. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58951RRef ELSE CAST(NULL AS BINARY(16)) END = T54._IDRRef
  531. LEFT OUTER JOIN dbo._Reference58869X1 T55
  532. ON T14._Fld58951RRef = T55._IDRRef
  533. LEFT OUTER JOIN dbo._Enum58762X1 T56
  534. ON T14._Fld58905RRef = T56._IDRRef
  535. LEFT OUTER JOIN dbo._Reference58872X1 T57
  536. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58942RRef ELSE CAST(NULL AS BINARY(16)) END = T57._IDRRef
  537. LEFT OUTER JOIN dbo._Reference58872X1 T58
  538. ON T14._Fld58942RRef = T58._IDRRef
  539. LEFT OUTER JOIN dbo._Reference281 T59
  540. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49706RRef ELSE CAST(NULL AS BINARY(16)) END = T59._IDRRef) AND (T59._Fld2118 = @P75)
  541. LEFT OUTER JOIN dbo._Reference281 T60
  542. ON (T14._Fld49706RRef = T60._IDRRef) AND (T60._Fld2118 = @P76)
  543. LEFT OUTER JOIN dbo._Reference58747X1 T61
  544. ON T14._Fld58874RRef = T61._IDRRef
  545. LEFT OUTER JOIN dbo._Reference58748X1 T62
  546. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58947RRef ELSE CAST(NULL AS BINARY(16)) END = T62._IDRRef
  547. LEFT OUTER JOIN dbo._Reference58748X1 T63
  548. ON T14._Fld58947RRef = T63._IDRRef
  549. LEFT OUTER JOIN dbo._Enum58764X1 T64
  550. ON T14._Fld58957RRef = T64._IDRRef
  551. LEFT OUTER JOIN dbo._Reference633 T65
  552. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49721RRef ELSE CAST(NULL AS BINARY(16)) END = T65._IDRRef) AND (T65._Fld2118 = @P77)
  553. LEFT OUTER JOIN dbo._Reference633 T66
  554. ON (T14._Fld49721RRef = T66._IDRRef) AND (T66._Fld2118 = @P78)
  555. LEFT OUTER JOIN dbo._Reference626 T67
  556. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58944RRef ELSE CAST(NULL AS BINARY(16)) END = T67._IDRRef) AND (T67._Fld2118 = @P79)
  557. LEFT OUTER JOIN dbo._Reference626 T68
  558. ON (T14._Fld58944RRef = T68._IDRRef) AND (T68._Fld2118 = @P80)
  559. LEFT OUTER JOIN dbo._Reference541X1 T69
  560. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58884RRef ELSE CAST(NULL AS BINARY(16)) END = T69._IDRRef) AND (T69._Fld2118 = @P81)
  561. LEFT OUTER JOIN dbo._Reference541X1 T70
  562. ON (T14._Fld58884RRef = T70._IDRRef) AND (T70._Fld2118 = @P82)
  563. LEFT OUTER JOIN dbo._Reference541X1 T71
  564. ON (T1.Q_001_F_013RRef = T71._IDRRef) AND (T71._Fld2118 = @P83)
  565. LEFT OUTER JOIN dbo._Reference42X1 T72
  566. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58883RRef ELSE CAST(NULL AS BINARY(16)) END = T72._IDRRef) AND (T72._Fld2118 = @P84)
  567. LEFT OUTER JOIN dbo._Reference42X1 T73
  568. ON (T14._Fld58883RRef = T73._IDRRef) AND (T73._Fld2118 = @P85)
  569. LEFT OUTER JOIN dbo._Reference58990X1 T74
  570. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld59006RRef ELSE CAST(NULL AS BINARY(16)) END = T74._IDRRef
  571. LEFT OUTER JOIN dbo._Reference58990X1 T75
  572. ON T14._Fld59006RRef = T75._IDRRef
  573. LEFT OUTER JOIN dbo._Enum59043X1 T76
  574. ON T10.Fld59047RRef = T76._IDRRef
  575. LEFT OUTER JOIN dbo._Reference58744X1 T77
  576. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58955RRef ELSE CAST(NULL AS BINARY(16)) END = T77._IDRRef
  577. LEFT OUTER JOIN dbo._Reference58744X1 T78
  578. ON T14._Fld58955RRef = T78._IDRRef
  579. LEFT OUTER JOIN dbo._Reference58870X1 T79
  580. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58956RRef ELSE CAST(NULL AS BINARY(16)) END = T79._IDRRef
  581. LEFT OUTER JOIN dbo._Reference58870X1 T80
  582. ON T14._Fld58956RRef = T80._IDRRef
  583. LEFT OUTER JOIN dbo._Reference537 T81
  584. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58882RRef ELSE CAST(NULL AS BINARY(16)) END = T81._IDRRef) AND (T81._Fld2118 = @P86)
  585. LEFT OUTER JOIN dbo._Reference537 T82
  586. ON (T14._Fld58882RRef = T82._IDRRef) AND (T82._Fld2118 = @P87)
  587. LEFT OUTER JOIN dbo._Reference58871X1 T83
  588. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58940RRef ELSE CAST(NULL AS BINARY(16)) END = T83._IDRRef
  589. LEFT OUTER JOIN dbo._Reference58871X1 T84
  590. ON T14._Fld58940RRef = T84._IDRRef
  591. LEFT OUTER JOIN dbo._Enum58760X1 T85
  592. ON T15._Fld58802RRef = T85._IDRRef
  593. LEFT OUTER JOIN dbo._Reference569X1 T86
  594. ON (CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld49705RRef ELSE CAST(NULL AS BINARY(16)) END = T86._IDRRef) AND (T86._Fld2118 = @P88)
  595. LEFT OUTER JOIN dbo._Reference569X1 T87
  596. ON (T14._Fld49705RRef = T87._IDRRef) AND (T87._Fld2118 = @P89)
  597. LEFT OUTER JOIN dbo._Reference343X1 T88
  598. ON (T1.Q_001_F_000RRef = T88._IDRRef) AND (T88._Fld2118 = @P90)
  599. LEFT OUTER JOIN dbo._Reference630X1 T89
  600. ON (T1.Q_001_F_004RRef = T89._IDRRef) AND (T89._Fld2118 = @P91)
  601. LEFT OUTER JOIN dbo._Reference58741X1 T90
  602. ON CASE WHEN CASE WHEN T1.Q_001_F_003RRef IS NOT NULL THEN 0x00000116 END = 0x00000116 THEN T14._Fld58910RRef ELSE CAST(NULL AS BINARY(16)) END = T90._IDRRef
  603. LEFT OUTER JOIN dbo._Reference58741X1 T91
  604. ON T14._Fld58910RRef = T91._IDRRef
  605. --?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top