mssql查询以检索数字和字母数字条目 [英] mssql query to retrieve numeric and alphanumeric entries
本文介绍了mssql查询以检索数字和字母数字条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你们可以帮助一个quire从列中检索数字和字母数字条目。
示例:列是'ID',条目可以是= abc0000或者全部是9999999999.
搜索是一个数字和字母数字项目列表。
示例:8765398 ha34789 ss0487667 7629
我希望结果显示每个字母和数字搜索项的完整行。
解决方案
您可以在where子句中使用数值作为字母数字。
选择 *
来自 table1
其中 ID IN (' 8765398',' ha34789',' ss0487667',' 7629')
Hi can anyone help with a quire to retrieve both numeric and alpha numeric entries from a column.
Example: Column is 'ID' and entries could be = abc0000 or could be all 9999999999.
The search is a list of numeric and alphanumeric items.
Example: 8765398 ha34789 ss0487667 7629
I wish the result to show the full line for each alphanumeric and numeric search item.
解决方案
You can use numeric values as alphanumeric in where clause.
select * from table1 where ID IN ('8765398' , 'ha34789' , 'ss0487667','7629')
这篇关于mssql查询以检索数字和字母数字条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文