On 10/15/2015 9:36 AM, Don V Nielsen wrote: > limit ifnull( ( > select net_non_pieces from crrt_net_non net > where net.zip=zip and net.crrt=crrt
I suspect this WHERE clause is equivalent to "where net.zip=net.zip and net.crrt=net.crrt" - that is, always true. The actual limit value comes from whichever row accidentally happens to be first. -- Igor Tandetnik