adding a concatenated field in an SQL query breaks LIKE
pete at lcsql.com
Sun Jul 13 19:00:45 CEST 2014
Thanks, our posts crossed.
Still confused though. There is no "$" wildcard available for the LIKE
operator, only "%" and "_"
One other possibility. It seems the LIKE operator has problems with
non-ASCII characters - any chance asset includes some, perhaps accented
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
On Sun, Jul 13, 2014 at 8:34 AM, Dr. Hawkins <dochawk at gmail.com> wrote:
> On Sat, Jul 12, 2014 at 7:20 PM, Dr. Hawkins <dochawk at gmail.com> wrote:
> > However, when I add one more concatenated field for the LIKE to search
> > through, I get the query (which seems correct)
> > SELECT uniqDna, cname, cadr, reason, asset FROM vader_darth______001_dna
> > WHERE ((cadr NOT NULL) AND (chrType<>'K') AND ((cname ||cadr || reason)
> > LIKE '%alde%' )) ORDER BY cname ASC, cadr ASC;
> This should have included (cname ||cadr || reason || asset), not just the
> first three.
> I've also found that
> (((cname ||cadr || reason) LIKE '%alde%' ) OR (asset LIKE '%aide$'))
> gives the result that I would expect from
> ((cname ||cadr || reason || asset) LIKE '%alde%' )
> Is there some kind of concatenation limit, perhaps?
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode