yhdata_3KfWnIs4青铜二
2022-7-4 14:39:49 发布在问答
【数据处理】 请问数据集里怎么动态拼接筛选条件
问题遇到的现象和发生背景

使用sql语句动态拼接where条件,条件中包含 or

问题相关代码,请勿粘贴截图

select * from dict where 单位编码 IN ('10206') and ver='510' and substr(日期, 1, 7) between '2016-01' and '2035-12' and formula_id='首发集团合并快报' OR ( 单位编码 IN ('10210') and ver='510' and substr(日期, 1, 7) between '2016-01' and '2035-12' and formula_id='首发集团合并快报')

我想要达到的结果

where 后面的筛选条件需要通过sql查询数据表获得,怎么将SQL拼接到where 后面


1520
1
精彩评论1
yhdata_lyaa
发表于 2022-7-4 15:25:56 显示全部楼层
网上查一下SQL怎么写呢
回复

使用道具 2#

高级模式
您需要登录后才可以回帖 登录 | 免费注册

  • 官方微信

    欢迎关注永洪服务号!收费为0,价值无限

    扫码关注
  • 新浪微博

    让每位用户轻松挖掘数据价值!

    访问新浪微博
  • 智能客服
1500W

用户等你来哦

Copyright   ©2012-2025  北京永洪商智科技有限公司  (京ICP备12050607) 京公网安备110110802011451号 |《永洪社区协议》
返回顶部