妙手老中医白银四
2023-6-14 16:14:25 发布在问答
【数据处理】 sql传参可以多个值吗?
各位大佬好!
sql传参可以这样写吗?
select * from xxxx where xxx.a = xxx <a> and xxx.b = ?{a}  and xxx.c = ?{a} and xxx.d = ?{a}<a>
或者是
select * from xxxx where xxx.a = xxx <a> and xxx.b = ?{a} <a><a> and xxx.c = ?{a} <a>
的格式吗?

最佳答案

永洪vip
yhdata_lyaa

2023-06-14 16:14:26

参考https://www.yonghongtech.com/real-help/Z-Suite/10.0/ch/paramindataset.html
查看完整内容
2349
6
精彩评论6
yhdata_lyaa
发表于 2023-6-14 16:14:26 显示全部楼层
回复

使用道具 2#

妙手老中医白银四
发表于 2023-6-14 17:01:16 显示全部楼层

当参数只有一个,但是我想对多个字段进行过滤的时候可以重复的使用一个标签吗?

回复

使用道具 3#

妙手老中医白银四
发表于 2023-6-14 17:05:44 显示全部楼层
yhdata_lyaa 发表于 2023-6-14 16:16
参考https://www.yonghongtech.com/real-help/Z-Suite/10.0/ch/paramindataset.html

或者是这个?{a}的参数使用多次
回复

使用道具 4#

妙手老中医白银四
发表于 2023-6-14 17:07:55 显示全部楼层
yhdata_lyaa 发表于 2023-6-14 16:16
参考https://www.yonghongtech.com/real-help/Z-Suite/10.0/ch/paramindataset.html

select * from a <time>where a.time1>=?{time} or a.time2>=?{time} or a.time3>=?{time}</time>
回复

使用道具 5#

yhdata_lyaa
发表于 2023-6-14 17:18:02 显示全部楼层
妙手老中医 发表于 2023-6-14 17:05
或者是这个?{a}的参数使用多次

可以
回复

使用道具 6#

妙手老中医白银四
发表于 2023-6-14 17:20:55 显示全部楼层

嗯嗯刚刚试了,是可以的
回复

使用道具 7#

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

  • 官方微信

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

    扫码关注
  • 新浪微博

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

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

用户等你来哦

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