1 -- 4.4.1 and 4.5.0 fix - synchronize flcol_report_id
4 if fetchMetricText('ServerVersion') < '4.6.0' then
6 update flcol set flcol_report_id = (select report_id from report
7 where report_name = 'FinancialReport'
8 order by report_grade desc
10 where flcol_report_id=285
13 from flcol left join report on flcol_report_id = report_id
14 where report_id is null)
17 update flcol set flcol_report_id = (select report_id from report
18 where report_name = 'FinancialReportMonth'
19 order by report_grade desc
21 where flcol_report_id in (375, 335)
24 from flcol left join report on flcol_report_id = report_id
25 where report_id is null)
28 update flcol set flcol_report_id = (select report_id from report
29 where report_name = 'FinancialReportMonthBudget'
30 order by report_grade desc
32 where flcol_report_id in (376, 336)
35 from flcol left join report on flcol_report_id = report_id
36 where report_id is null)
39 update flcol set flcol_report_id = (select report_id from report
40 where report_name = 'FinancialReportMonthDbCr'
41 order by report_grade desc
43 where flcol_report_id=387
46 from flcol left join report on flcol_report_id = report_id
47 where report_id is null)
50 update flcol set flcol_report_id = (select report_id from report
51 where report_name = 'FinancialReportMonthPriorMonth'
52 order by report_grade desc
54 where flcol_report_id in (377, 337)
57 from flcol left join report on flcol_report_id = report_id
58 where report_id is null)
61 update flcol set flcol_report_id = (select report_id from report
62 where report_name = 'FinancialReportMonthPriorQuarter'
63 order by report_grade desc
65 where flcol_report_id in (386, 346)
68 from flcol left join report on flcol_report_id = report_id
69 where report_id is null)
72 update flcol set flcol_report_id = (select report_id from report
73 where report_name = 'FinancialReportMonthPriorYear'
74 order by report_grade desc
76 where flcol_report_id in (378, 338)
79 from flcol left join report on flcol_report_id = report_id
80 where report_id is null)
83 update flcol set flcol_report_id = (select report_id from report
84 where report_name = 'FinancialReportMonthQuarter'
85 order by report_grade desc
87 where flcol_report_id in (379, 339)
90 from flcol left join report on flcol_report_id = report_id
91 where report_id is null)
94 update flcol set flcol_report_id = (select report_id from report
95 where report_name = 'FinancialReportMonthYear'
96 order by report_grade desc
98 where flcol_report_id in (374, 334)
101 from flcol left join report on flcol_report_id = report_id
102 where report_id is null)
105 update flcol set flcol_report_id = (select report_id from report
106 where report_name = 'FinancialReportQuarter'
107 order by report_grade desc
109 where flcol_report_id in (380, 340)
112 from flcol left join report on flcol_report_id = report_id
113 where report_id is null)
116 update flcol set flcol_report_id = (select report_id from report
117 where report_name = 'FinancialReportQuarterBudget'
118 order by report_grade desc
120 where flcol_report_id in (381, 341)
123 from flcol left join report on flcol_report_id = report_id
124 where report_id is null)
127 update flcol set flcol_report_id = (select report_id from report
128 where report_name = 'FinancialReportQuarterPriorQuarter'
129 order by report_grade desc
131 where flcol_report_id in (382, 342)
134 from flcol left join report on flcol_report_id = report_id
135 where report_id is null)
138 update flcol set flcol_report_id = (select report_id from report
139 where report_name = 'FinancialReportYear'
140 order by report_grade desc
142 where flcol_report_id in (383, 343)
145 from flcol left join report on flcol_report_id = report_id
146 where report_id is null)
149 update flcol set flcol_report_id = (select report_id from report
150 where report_name = 'FinancialReportYearBudget'
151 order by report_grade desc
153 where flcol_report_id in (384, 344)
156 from flcol left join report on flcol_report_id = report_id
157 where report_id is null)
160 update flcol set flcol_report_id = (select report_id from report
161 where report_name = 'FinancialReportYearPriorYear'
162 order by report_grade desc
164 where flcol_report_id in (385, 345)
167 from flcol left join report on flcol_report_id = report_id
168 where report_id is null)
171 update flcol set flcol_report_id = (select report_id from report
172 where report_name = 'FinancialTrend'
173 order by report_grade desc
175 where flcol_report_id=388
178 from flcol left join report on flcol_report_id = report_id
179 where report_id is null)