изменить запрос из postgresql в оракул - PullRequest
0 голосов
/ 04 мая 2018

как изменить этот запрос с postgresql на oracle?

    SELECT tbmm.tbmm_id,
    tbmm.tbmm_email AS seller_mail,
    'FB' AS seller_type,
    concat(tbmm.tbmm_firstname, COALESCE(tbmm.tbmm_middlename), 
COALESCE(tbmm.tbmm_lastname)) AS seller_owner_name,
    tbmss.tbmss_name AS seller_store_name,
    tbmss.tbmss_description AS seller_description,
    tbmss.tbmss_phone AS seller_phone,
    btrim(concat(COALESCE(tbmma.tbmma_addr1), COALESCE(tbmma.tbmma_addr2, 
tbmma.tbmma_addr1), COALESCE(tbmma.tbmma_addr3, tbmma.tbmma_addr1), 
COALESCE(tbmkc.tbmkct_nama), COALESCE(tbmkl.tbmkl_nama), 
COALESCE(tbmma.tbmma_postcode, '0') AS seller_store_address,
    tbmb.tbmb_name AS bank_name,
    concat(tbmb.tbmb_name, COALESCE(tbmsd.tbmsd_bank_account_branch) AS 
bank_desc,
    tbmsd.tbmsd_bank_account_no AS bank_account_no,
    tbmsd.tbmsd_bank_account_name AS bank_account_name,
    tbmsd.tbmsd_no_id AS seller_id_card,
    'F' AS flag_alfamind,
    0 AS commision,
    tbmm.tbmm_mage_entity_id,
    tbmm.tbmm_update_date AS member_update_date,
    tbmss.tbmss_update_date AS store_update_date,
    tbmsd.tbmsd_update_date AS document_update_date,
    tbmma.tbmma_update_date AS address_update_date
   FROM coreapp.tb_master_member tbmm
     JOIN coreapp.tb_master_seller_store tbmss ON tbmm.tbmm_id = 
tbmss.tbmm_id
     JOIN coreapp.tb_master_seller_document tbmsd ON tbmsd.tbmm_id = 
tbmm.tbmm_id
     JOIN coreapp.tb_master_bank tbmb ON tbmb.tbmb_id = tbmsd.tbmb_id
     JOIN coreapp.tb_master_member_group tbmg ON tbmg.tbmm_id = tbmm.tbmm_id
     LEFT JOIN coreapp.tb_master_member_address tbmma ON tbmma.tbmm_id = 
tbmm.tbmm_id AND tbmma.tbmma_address_type = 140 AND tbmma.tbmma_status = 23
     LEFT JOIN coreapp.tb_master_kecamatan tbmkc ON 
tbmkc.tbmkct_kecamatan_id = tbmma.tbmkct_kecamatan_id
     LEFT JOIN coreapp.tb_master_kelurahan tbmkl ON tbmkl.tbmkl_kelurahan_id 
= tbmma.tbmkl_kelurahan_id
  WHERE tbmg.tbmg_id = 4;

Я пытаюсь запросить у моего разработчика SQL, но что-то ошибка с запросом сейчас я просто пробую до одного дня и все еще не могу бежать

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...