P粉0638625612023-09-03 00:00:31
Since you mentioned "the asterisk is always at the end" then you can try
Where example_id LIKE '%*'
.
This will find any value ending with "*"
or
is to search for substrings in the columns of the table.
One way to achieve it is to use the instr() function, which takes 3 parameters.
Syntax: instr(rank, string, sub_string)
Ranking:
Now how do I apply this to the table? Since the instr() function is x3, it is simple to apply.
For example: filter[ZCT] where instr(1,ALLOTEDTO,”Ram”) <> 0.
Where 1 is the starting position to find the substring, ALLOTEDTO is the column name composed of strings, and the last parameter is the substring itself. This will give you all records in the table where the ALLOTEDTO column contains the substring "Ram"
This is equivalent to.
Select * from ZCT where ALLOTEDTO is similar to "%Ram%".
Note: The Instr() function is case-sensitive, so always use uppercase or lowercase functions.