Quick SQL question

Klaus major-k klaus at major-k.de
Mon Jul 15 08:56:00 EDT 2013


Hi Pete,

Am 15.07.2013 um 15:25 schrieb john at splash21.com:

> Most engines have a concatenate command, something like;
> WHERE CONCAT(name, tags, comment) LIKE '%tUserInput%'

Aha, cool! Thanks!
Do you know if this supported by SQLite?

> :)
> 
> Quoting Klaus major-k <klaus at major-k.de>:
> 
>> Hi firends,
>> 
>> with a table consisting of 3 (or more) db fields:
>> name
>> tags
>> comment
>> 
>> If I want to find a value in ALL of the three (or more) db fields, I now use:
>> ...
>> ## Pseudocode, quotes etc missing, I know!
>> put fld "searchfield" into tUserInput
>> select * from myTable where name LIKE %tUserInput% OR tags LIKE %tUserInput% OR comments  LIKE %tUserInput%
>> ...
>> You get the picture :-)
>> 
>> Now my question: Is there a shorter SQL command for my purpose, that I did not find yet?
>> Thanks in advance!

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list