
SELECT A.ba_class_seq
     , A.ba_comp_seq
     , A.class_cd
     , A.class_l_seq
     , A.class_m_seq
     , A.class_s_seq
     , A.class_depth
     , A.class_nm
     , IF(A.class_cd = 'GDCLSA001',A.sort_idx+1000,A.sort_idx+2000) AS sort_idx
     , A.use_yn
  FROM BA_CLASS A
 WHERE A.ba_comp_seq = :login_comp_seq
   AND A.disp_yn = 'Y'
   AND A.use_yn = 'Y'
   AND A.class_cd = :class_cd
 ORDER BY sort_idx ASC, A.ba_class_seq ASC