SQL判断 一个字段为空时,取出另一个字段数据
table = db.exec_sql("""insert into dw.part_subject ( part_name, part_type, part_status, reg_date, source_id, source) select case when iccard_name is not null then iccard_name else name end, '0', '0', create_datetime, id, '' from ods.sl_account_560;""")
posted on 2020-06-01 19:29 wenbin_ouyang 阅读(9729) 评论(0) 编辑 收藏 举报