Revision 4a5e3c2c
Von Thomas Heck vor etwa 12 Jahren hinzugefügt
sql/Pg-upgrade2/finanzamt_update_fa_bufa_nr_hamburg.pl | ||
---|---|---|
1 |
# @tag: finanzamt_update_fa_bufa_nr_hamburg |
|
2 |
# @description: Aktualisiert die fa_bufa_nr f?r Hamburg |
|
3 |
# @depends: release_2_7_0 |
|
4 |
# @charset: utf-8 |
|
5 |
package finanzamt_update_fa_bufa_nr_hamburg; |
|
6 |
use utf8; |
|
7 |
use strict; |
|
8 |
|
|
9 |
if ( !$::form ) { |
|
10 |
die('This script cannot be run from the command line.'); |
|
11 |
} |
|
12 |
|
|
13 |
sub query { |
|
14 |
my ($query) = @_; |
|
15 |
|
|
16 |
if ( !$dbh->do($query) ) { |
|
17 |
die($dbup_locale->text('Database update error:') .'<br>'. $query .'<br>'. $DBI::errstr); |
|
18 |
} |
|
19 |
} |
|
20 |
|
|
21 |
my @data = ( |
|
22 |
['02', '41'], |
|
23 |
['57', '42'], |
|
24 |
['71', '43'], |
|
25 |
['15', '43'], |
|
26 |
['03', '44'], |
|
27 |
['54', '45'], |
|
28 |
['22', '46'], |
|
29 |
['06', '47'], |
|
30 |
['74', '48'], |
|
31 |
['26', '49'], |
|
32 |
['09', '50'], |
|
33 |
['08', '51'], |
|
34 |
); |
|
35 |
|
|
36 |
foreach my $entry (@data) { |
|
37 |
query(' |
|
38 |
UPDATE finanzamt |
|
39 |
SET |
|
40 |
fa_bufa_nr = \'22'. $entry->[1] .'\' |
|
41 |
WHERE |
|
42 |
fa_land_nr = \'2\' |
|
43 |
AND fa_bufa_nr = \'22'. $entry->[0] .'\';'); |
|
44 |
} |
|
45 |
|
|
46 |
return 1; |
Auch abrufbar als: Unified diff
Update der Finanzamtnummern in Hamburg
fixt #1841