Select Statement using LIKE with SQL Lite in an AIR Application
Working on an AIR project with the local SQLLite database I created a search interface that required a LIKE operator for my SQL statement. Normally, it's not a big deal. I would put some single quotes with percent symbols as wild card around my search parameter.
It took a bit of searching to find out the correct syntax with SQL Lite for the AIR application. See below.
SELECT *
FROM tblFruit
WHERE (tblFruit.label) LIKE '%' || @SEARCHTEXT || '%'
FROM tblFruit
WHERE (tblFruit.label) LIKE '%' || @SEARCHTEXT || '%'
I've created a project file which demonstrates the above code.
Aren't sure how to import this into your flex workspace? I've written a post about that as well.
Recent Comments