[英]escape special characters ~ and / in sql server query
I want to Escape SPecial character ~ and /. 我想转义特殊字符〜和/。
My Barcode in the text box will be as: ~~~671524055212/ but I want to search it as 671524055212 我在文本框中的条形码将为: ~~~ 671524055212 /,但我想将其搜索为671524055212
How to remove these special characters? 如何删除这些特殊字符?
What I'm using currently is this , which does not work. 我目前正在使用的是this,它不起作用。
SELECT LocalSKU,ItemName,QOH,Price,Integer2,Integer3 FROM Inventory where Barcode LIKE '%671524055212%' escape '/'
This should work: 这应该工作:
SELECT LocalSKU,ItemName,QOH,Price,Integer2,Integer3 FROM Inventory where Barcode LIKE '%671524055212%' 从库存中选择SELECT LocalSKU,ItemName,QOH,Price,Integer2,Integer3,其中条形码类似'%671524055212%'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.