SELECT A.gd_mst_seq
     , A.gd_mst_cd
     , A.ba_comp_seq
     , A.cate_cls_l_seq
     , A.cate_cls_m_seq
     , A.cate_cls_s_seq
     , A.tour_cls_seq
     , A.start_cls_seq
     , A.trans_cls_seq
     , A.trans_cls_name AS trans
     , A.area_cls_seq
     , A.gd_nm
     , A.gd_summary
     , A.night_cnt
     , A.day_cnt
     , A.min_cnt
     , A.mst_amt
     , A.rs_day_st
     , A.rs_day_ed
     , A.sale_day_st
     , A.sale_day_ed
     , A.special_yn
     , A.special_template_seq
     , A.special_desc
     , A.include_yn
     , A.include_template_seq
     , A.include_desc
     , A.exclude_yn
     , A.exclude_template_seq
     , A.exclude_desc
     , A.refund_yn
     , A.refund_template_seq
     , A.refund_desc
     , A.booking_yn
     , A.booking_template_seq
     , A.booking_desc
     , A.detail_yn
     , A.detail_template_seq
     , A.detail_desc
     , A.station_arr
     , A.station_rtn
     , A.gd_option_arr
     , (SELECT O.option_nm FROM GD_OPTION O WHERE O.gd_option_seq = A.gd_option_arr) AS option_nm
     , A.train_info_yn
     , A.train_st_station_seq
     , A.train_ed_station_seq
     , A.train_rtn_daynum
     , A.icon_arr
     , A.img_path_arr
     , A.local_msg
     , A.cha_user_id
     , A.train_open_yn
     , A.train_open_arr
     , A.train_open_seq_arr
     , A.homepage_disp_yn
     , A.homepage_disp_arr
     , A.sort_idx
     , A.gd_plan_desc
     , A.gd_plan_yn
     , C.user_nm as cha_user_nm
     , C.user_hp as cha_user_hp
  FROM GD_MST A
  LEFT OUTER JOIN BA_USER C ON A.cha_user_id = C.user_id
 WHERE A.ba_comp_seq = :login_comp_seq
 AND A.gd_mst_seq = :gd_mst_seq
