简体   繁体   中英

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

How to remove these special characters?

What I'm using currently is this , which does not work.

        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%'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM