X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d4925a8b60f04674885e30d9316dc0263f8b9a84..b293ff8ad52fc76ba0c44783e3982418114d6b08:/sql/Pg-upgrade2/customer_remove_empty_additional_billing_addresses.sql

diff --git a/sql/Pg-upgrade2/customer_remove_empty_additional_billing_addresses.sql b/sql/Pg-upgrade2/customer_remove_empty_additional_billing_addresses.sql
new file mode 100644
index 000000000..bb603582e
--- /dev/null
+++ b/sql/Pg-upgrade2/customer_remove_empty_additional_billing_addresses.sql
@@ -0,0 +1,16 @@
+-- @tag: customer_remove_empty_additional_billing_addresses
+-- @description: Leere Â»zusÃ¤tzliche RechnungsadressenÂ« entfernen
+-- @depends: customer_additional_billing_addresses
+DELETE
+FROM additional_billing_addresses
+WHERE (coalesce(name,         '') = '')
+  AND (coalesce(department_1, '') = '')
+  AND (coalesce(department_2, '') = '')
+  AND (coalesce(contact,      '') = '')
+  AND (coalesce(street,       '') = '')
+  AND (coalesce(zipcode,      '') = '')
+  AND (coalesce(city,         '') = '')
+  AND (coalesce(country,      '') = '')
+  AND (coalesce(email,        '') = '')
+  AND (coalesce(phone,        '') = '')
+  AND (coalesce(fax,          '') = '');
