adding a concatenated field in an SQL query breaks LIKE
Dr. Hawkins
dochawk at gmail.com
Sat Jul 12 19:46:52 EDT 2014
I have the query
SELECT uniqDna, cname, cadr , reason, asset FROM vader_darth______001_dna
WHERE (cname || cadr NOT NULL) AND (chrType <> 'K') AND ((cname || cadr ||
reason || asset) LIKE '%bank%') ORDER BY cname ASC, cadr ASC ;
As written, it incorrectly only returns the first result with "Bank" in it.
If I remove the fourth concatenation, ||asset, it correctly finds all
instances with "Bank" in any field (5 instances).
If I reduce my search from "Bank" to "B", it finds the other instances with
B (or at least man)--but leaves out the other 4 with "Bank" !!
This is for in-memory SQLite, on 5.5.4
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
More information about the use-livecode
mailing list