Re: Quick SQL question

2013-07-15 Thread Klaus major-k
Hi Pete, Am 15.07.2013 um 21:43 schrieb Peter Haworth : > On Mon, Jul 15, 2013 at 10:54 AM, Klaus major-k wrote: > >> Same value in all columns! > > > Hi Klaus, > OK, should probably be OK then. Great, thanks! > There is one corner case but it's pretty > unlikely. > > Let's say there is

Re: Quick SQL question

2013-07-15 Thread Peter Haworth
On Mon, Jul 15, 2013 at 10:54 AM, Klaus major-k wrote: > Same value in all columns! Hi Klaus, OK, should probably be OK then. There is one corner case but it's pretty unlikely. Let's say there is a row with your three columns containing: code sign xyz ...and the value you are looking for i

Re: Quick SQL question

2013-07-15 Thread Klaus major-k
Hi Peter, Am 15.07.2013 um 17:39 schrieb Peter Haworth : > I'm thinking this may not give you the same results as checking each column > individually. Is the need to check for the same value in each column or > for a different value in each column? Same value in all columns! > Pete > lcSQL Sof

Re: Quick SQL question

2013-07-15 Thread Peter Haworth
I'm thinking this may not give you the same results as checking each column individually. Is the need to check for the same value in each column or for a different value in each column? Pete lcSQL Software On Mon, Jul 15, 2013 at 6:39 AM, Klaus major-k wrote: > > Am 15.

Re: Quick SQL question

2013-07-15 Thread Klaus major-k
Am 15.07.2013 um 15:59 schrieb j...@splash21.com: > Googling it suggests that '||' is concatenate in SQLite, so try; > > WHERE (name || tags || comment) LIKE '%. Wonderful, will try this! Thanks a bunch! Best Klaus -- Klaus Major http://www.major-k.de kl...@major-k.de

Re: Quick SQL question

2013-07-15 Thread john
Googling it suggests that '||' is concatenate in SQLite, so try; WHERE (name || tags || comment) LIKE '%. Quoting Klaus major-k : Hi Pete, Am 15.07.2013 um 15:25 schrieb j...@splash21.com: Most engines have a concatenate command, something like; WHERE CONCAT(name, tags, comment) LIKE

Re: Quick SQL question

2013-07-15 Thread Klaus major-k
Hi Pete, Am 15.07.2013 um 15:25 schrieb j...@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 : > >> Hi firends, >> >> wi

Re: Quick SQL question

2013-07-15 Thread john
Most engines have a concatenate command, something like; WHERE CONCAT(name, tags, comment) LIKE '%tUserInput%' :) Quoting Klaus major-k : 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

Quick SQL question

2013-07-15 Thread Klaus major-k
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