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 || '%'

 

I've created a project file which demonstrates the above code.

 

Download flex project here.

 

Aren't sure how to import this into your flex workspace? I've written a post about that as well.

 

0 responses to “Select Statement using LIKE with SQL Lite in an AIR Application”

Leave a Reply

Leave this field empty:

Powered by Mango Blog.