Sqlite equivalent of INSTR

Bill Norris

Active Member
Licensed User
Longtime User
Have determined that sqlite does not have an INSTR function, so I am trying to use the IN function, as in

SELECT * FROM [TABLE_NAME] WHERE ("10" IN [FIELD_NAME])

to return all rows that contain the value "10" in a particular column.

I get an error that says:

only a single result allowed for a SELECT that is part of an expression

Any help appreciated, or perhaps another function that accomplishes the goal.

Thanks,
bill
 
If SqlLite supports ANSI SQL you should be able to use following statements

Field contains '10':
where [FIELD_NAME] like '%10%'

Field starts with '10':
where [FIELD_NAME] like '10%'

Field ends with '10':
where [FIELD_NAME] like '%10'

this is: % stands for one or more characters
_ stands for a single character
 
Upvote 0
Back
Top