sql表达式模式匹配
我想检查 sql 中的模式,如果该表达式(或表格单元格)中有除数字以外的任何内容,则应返回 1。如果整个单元格只有数字值,则应返回 0
eq:
case when '200290' like [anything other than numbers]
then 1
else o
I want to check for a pattern in sql such that if there is anything in that expression (or table cell) other than numeric it should return 1. If that whole cell has only numeric values it should return 0
eq:
case when '200290' like [anything other than numbers]
then 1
else o
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 SQL Server 中,您可以使用类似的东西(我不会为您编写整个函数):
In SQL Server, you can use something like (I'm not writing the whole function for you):
例如:
* 查询已完成。找到一排。一列返回。
* 总经过时间为 1 秒。
* 查询已完成。找到一排。一列返回。
* 总耗时为 1 秒。
Ex.:
* Query completed. One row found. One column returned.
* Total elapsed time was 1 second.
* Query completed. One row found. One column returned.
* Total elapsed time was 1 second.