On Sun, Nov 8, 2009 at 10:20 AM, Ted Rolle <ster...@gmail.com> wrote: > On Sun, 8 Nov 2009 10:31:05 -0500 > "Igor Tandetnik" <itandet...@mvps.org> wrote: > >> > SELECT * >> > FROM fm >> > WHERE name LIKE '%Juiian%' >> > AND info LIKE '%' || name || '%' >> > ORDER by name; >> > > Thanks for seeing the oversight. > When I use > > SELECT * > FROM fm > WHERE name LIKE '%Julian%' > OR info LIKE '%' || name || '%' > ORDER by name; > > it returns 224 columns. > > Perhaps I'm misunderstanding the concept. > It could be returning 5 columns with 'Julian' > AND all columns where column 'name' is LIKE column info. > That would be a whole lot more. >
You are misunderstanding the concept. The boolean AND works counter-intuitively from English... it actually makes the basket smaller. AND returns the values for which both conditions on either side of AND are true. What you are looking for is OR, which will return a bigger basket. > Ted > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users