简体   繁体   中英

Teradata escape characters in a string

I have some query to match a URL address, but the URL contains a special character '?' which I don't know how to escape.

the query is like:

select *
from table
where url = 'www.someaddress.com/**?something**=sth';

Any ideas?

You need to use an ESCAPE.

where url = 'www.someaddress.com/**?something**=sth';

would be

where url = 'www.someaddress.com/**@?something**=sth' ESCAPE '@';

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