I'm trying to make a sql select statement, but I'm confused about something and I'm not sure how to look for it.
Example:
Given the parameter "AB12", on my SQL I will have a field with value "AB"
I'm trying to do is something like:
Select * From SampleTable Where SampleField+'%' LIKE SampleParameter
I'm tried to explain my best.
Thanks all
The LIKE
pattern always goes on the right, not the left. Presumably, you intend:
Where SampleParameter LIKE SampleField + '%'
尝试
Where SampleField LIKE SampleParameter + '%'
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.