This is mainly a SQLite3 question but I’m hoping somebody may have a quick answer for me because I couldn’t google one…
I have a SQLite3 database created using the do shell script command. I can read the data and do all of the usual stuff, but I have one question. Right now I use applescript to do all of my string comparisons but I’m wondering if anyone knows how to let SQLite to the comparing.
For example suppose I have a database like so:
theBook theLength
this book title 10
that book title 20
If I want to find all of the books that have the word “book” in it, right now I read the entire table into applescript and issue the applescript command…
if “book” is in “this book title” then do something
But it occurs to me that SQLite3 should be able to do that for me so I don’t have to bring the entire table into applescript first. It would be nice if what came back to applescript was just the records I wanted. Does anyone know how to do simple string comparisons in SQLite3? The SQLite command would look something like the following but I don’t know what the equivalent “IS IN” command would be.
select theBook from myTable where theBook = ‘book’ <----- how do I change = into is in???