select id as id,
       IF(id=1, 1, 0) as own_flag_code,
       user_id as user_position_id,
       area_id as sales_area_id,
       NULL as hospital_code,
       disp_name as disp_name,
       id as disp_sort,
       j_name as j_name,
       e_name as e_name,
       NULL as hospital_name1,
       NULL as hospital_name2,
       kana_name as kana_name,
       zip as zip,
       address_1 as address_1,
       address_2 as address_2,
       address_3 as address_3,
       tel as tel,
       fax as fax,
       title_code as title_code,
       NULL as operation_number,
       note as note,
       NULL as p_name_1,
       NULL as p_name_2,
       IF(deleted_at is NULL, 0, 1) as invalid_flag_code,
       NULL as deleted_at,
       created_at as created_at,
       updated_at as updated_at
FROM warehouses
INTO OUTFILE "/tmp/warehouses.csv" FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\';
