X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44..53593baa211863fbf66540cf1bcc36c8fb37257f:/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, '') = '');