码迷,mamicode.com
首页 > 其他好文 > 详细

111

时间:2019-02-02 17:08:26      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:lse   school   The   bsp   concat   sel   cat   stage   select   

{
  "pk": "student_id",
  "sql": "select concat(‘#area_code#_‘,#pk#) as id,‘#area_code#‘ as area_code,#pk# as pk,‘t_base_student‘ as table_name,now() as report_time,t4.student_name,t4.xb_name,t4.create_time,t4.b_use,t4.bureau_id,t4.class_id,t4.identity_card,(select district_id from t_base_organization as t1 where t1.org_id=t4.bureau_id) as district_id,(select city_id from t_base_organization as t1 where t1.org_id=t4.bureau_id) as city_id,(select province_id from t_base_organization as t1 where t1.org_id=t4.bureau_id) as province_id,ifnull((select (case when t2.main_school_id=0 then t2.org_id else t2.main_school_id end)  from t_base_organization as t2 where t2.org_id=t4.bureau_id),t4.bureau_id) as main_school_id,ifnull((select stage_id from t_base_class as t3 where t3.class_id=t4.class_id),-1) as stage_id,ifnull((select entrance_year from t_base_class as t3 where t3.class_id=t4.class_id),-1) as entrance_year from t_base_student as t4 where t4.#pk#> #id# order by t4.#pk# #limit#"
}

111

标签:lse   school   The   bsp   concat   sel   cat   stage   select   

原文地址:https://www.cnblogs.com/littlehb/p/10348550.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!