Robert Valentino Well-Known Member Licensed User Longtime User Jun 9, 2025 #1 I have a SQLite DB that has a bunch of prefixes in it I want to see if the line I have matches one or more of the prefixes Cannot figure out how to say something like this B4X: "Select * for PrefixFile where <line> LIKE PrefixData%" ' where PrefixData is a Field in the PrefixFile that I want to LIKE on Can the SQLite Column be on the right side of this statement? '
I have a SQLite DB that has a bunch of prefixes in it I want to see if the line I have matches one or more of the prefixes Cannot figure out how to say something like this B4X: "Select * for PrefixFile where <line> LIKE PrefixData%" ' where PrefixData is a Field in the PrefixFile that I want to LIKE on Can the SQLite Column be on the right side of this statement? '
aeric Expert Licensed User Longtime User Jun 9, 2025 #2 You mean the matching should starts with value in PrefixData column? Upvote 0
aeric Expert Licensed User Longtime User Jun 9, 2025 #3 Data: line PrefixDataB4X IDEs consists of B4A, B4i, B4J and B4R.B4XB4A is an IDE to build Android apps.AndroidAndroid Studio is very complicated.Android SQL: SELECT * FROM PrefixFile WHERE line LIKE PrefixData||'%' Results: linePrefixDataB4X IDEs consists of B4A, B4i, B4J and B4R.B4XAndroid Studio is very complicated.Android Upvote 0
Data: line PrefixDataB4X IDEs consists of B4A, B4i, B4J and B4R.B4XB4A is an IDE to build Android apps.AndroidAndroid Studio is very complicated.Android SQL: SELECT * FROM PrefixFile WHERE line LIKE PrefixData||'%' Results: linePrefixDataB4X IDEs consists of B4A, B4i, B4J and B4R.B4XAndroid Studio is very complicated.Android
Robert Valentino Well-Known Member Licensed User Longtime User Jun 11, 2025 #4 Found the error in my code thanks to Aeric. I wasn't putting the quotes around the % sign Had this B4X: $"select * for PrefixFile where ${line} LIKE PrefixData || %"$ Upvote 0
Found the error in my code thanks to Aeric. I wasn't putting the quotes around the % sign Had this B4X: $"select * for PrefixFile where ${line} LIKE PrefixData || %"$