Quick SQL question

Peter Haworth pete at lcsql.com
Mon Jul 15 15:43:23 EDT 2013


On Mon, Jul 15, 2013 at 10:54 AM, Klaus major-k <klaus at major-k.de> 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 is "design".  Your concatenated string
will be "codesignxyz" so the row will be selected even though "design"
doesn't occur in any of the three columns.

Pretty unlikely I know but if you want to avoid that possibility, you could
include some sort of delimiter in your concatenated string, eg:

col1 || ' ' || col2 || ' ' || col3


Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list