I am currently trying to write a complex search function using the LIKE query in an AS400 Database.
I want to find all records that have a column SDVR01 which contains ‘LIxxxxx’. The ‘x’ are numbers. The problem is that the column can contain anything like :
‘ LI12345 ‘
‘LI12345’
‘something LI12345’
‘any string’
I can’t see how to do this with just the classics % and _
Is it possible ?
Thanks
‘LI12345’ -> Yes
‘asdLI12345’ -> Yes
‘LI12X345’ -> No