From: Michael Chang Date: April 29 2002 5:57pm Subject: Re: Not secting empty strings List-Archive: http://lists.mysql.com/mysql/107509 Message-Id: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hmm. How about: SELECT * FROM tablename WHERE LENGTH(somecolumn) > 0 AND ISNULL(othercolumn) != 1 Michael On Mon, 29 Apr 2002, Andrew Kuebler wrote: > I want to query records that do not contain empty strings and null > values through a SELECT statement. > > IS NOT NULL works for the nulls, but how I select non-empty strings > ("")? I tried everything I can think of and even some non-published > statements like name IS NOT '' ..... I just can't figure it out.... > > Can anyone help me? > > Thank you in advance! > > Andrew > > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail > To unsubscribe, e-mail > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > -- /*-------------------------------------------------------------------------- * "It might look like I'm doing nothing, but at the cellular level * I'm really quite busy." * ---anonymous * * * -----BEGIN GEEK CODE BLOCK----- * Version: 3.1 * GCS/P/H/L/O d- s-:-- a26 C++(+++) UL+++$>++++ P++ L+++ !E W+++ N- o? K- * w--(---) !O M+ !V PS+ PE- Y-- PGP- t+ 5-(--) X(-) R* tv b+ DI-- D-- G e+>++ * h+ r* y-- * ------END GEEK CODE BLOCK------ --------------------------------------------------------------------------*/