SELECT sup_created_at, sup_updated_at, sup_name, if(sup_code, sup_code, sup_name) as sup_code, sup_contact, sup_email, sup_website, sup_locale, sup_is_active, sup_notes, sup_street1, sup_street2, sup_postcode, sup_city, sup_state, sup_country, sup_telephone, sup_fax, sup_minimum_of_order, sup_carriage_free_amount, sup_currency, sup_tax_rate, sup_shipping_delay, sup_shipping_instructions, sup_sales_contact, sup_accounting_contact, sup_aftersale_contact, sup_sales_email, sup_accounting_email, sup_aftersale_email, sup_sales_phone, sup_accounting_phone, sup_aftersale_phone, sup_sales_notes, sup_accounting_notes, sup_aftersale_notes, sup_opened_order, sup_payment_terms, sup_supply_delay, sup_global_discount, sup_website_id, sup_enable_notification, sup_attach_pdf, sup_attach_file, sup_file_name, sup_file_header, sup_file_order_header, sup_file_product, sup_file_order_footer, sup_file_footer
FROM bms_supplier;