select
sup_name,
IF(LENGTH(sup_code) > 0, sup_code, concat('SUP_', sup_id)) as sup_code,
sup_contact,
sup_mail as sup_email,
sup_website,
sup_locale,
"1" as sup_is_active,
sup_comments as sup_notes,
sup_address1 as sup_street1,
sup_address2 as sup_street2,
sup_zipcode as sup_postcode,
sup_city,
sup_country,
sup_tel as sup_telephone,
sup_fax,
sup_order_mini as sup_minimum_of_order,
sup_free_carriage_amount as sup_carriage_free_amount,
sup_currency,
sup_tax_rate,
sup_shipping_delay,
sup_shipping_instructions,
sup_shipping_delay as sup_supply_delay
from
purchase_supplier