SELECT 1 AS `is_mig`
       , TRIM(branches.KD_CABANG) AS `code`
       , TRIM(branches.`NAMA_CABANG`) AS `name`
       , TRIM(branches.`FLAG_DATA`) AS `status`
       , TRIM(branches.`TGL_UPDATE`) AS `updated_at`
       , TRIM(branches.`ALAMAT`) AS `mig_alamat`
       , TRIM(branches.`FAX`) AS `mig_fax`
       , TRIM(branches.`FLAG_DATA`) AS `mig_flag_data`
       , TRIM(branches.`FLAG_OTO`) AS `mig_flag_oto`
       , TRIM(branches.`KODE_LEVEL`) AS `mig_kode_level`
       , TRIM(branches.`KODE_STATUS`) AS `mig_kode_status`
       , TRIM(branches.`KODEPOS`) AS `mig_kodepos`
       , TRIM(branches.`KOTA`) AS `mig_kota`
       , TRIM(branches.`TELEPON`) AS `mig_telepon`
       , TRIM(branches.`TGL_OTO`) AS `mig_tgl_oto` 
       , TRIM(branches.`TGL_UPDATE`) AS `mig_tgl_update`
       , TRIM(branches.`USER_OTO`) AS `mig_user_oto`       
       , TRIM(branches.`USER_UPDATE`) AS `mig_user_update`      
FROM `prm_cabang` branches
ORDER BY branches.KD_CABANG