469,312 Members | 2,496 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,312 developers. It's quick & easy.

last question on SQL string (hopefully)

thanks for your patience all

nearly done on the DB SQL string..
now I need to do once last check...check on an empty field

something like :- select from users where field not empty

which in any normal world might look like

SELECT * FROM users WHERE this_field <> ""

but problems here with inverted commas etc..

I've tried a whole bunch of strings but none seem to work, cos I'm just so
damn thick!!!!

and the solution is...step forward people cleverer (great word) than me....

thanks again
VERY VERY frustrating knowing exactly what you want to do but lacking the
skills to do it


Jul 19 '05 #1
1 1247
WHERE LEN(this_column) > 0

(This will take care of empty strings and NULL values.)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Alistair" <news@*remove*alistairb.co.uk> wrote in message
news:vv************@corp.supernews.com...
thanks for your patience all

nearly done on the DB SQL string..
now I need to do once last check...check on an empty field

something like :- select from users where field not empty

which in any normal world might look like

SELECT * FROM users WHERE this_field <> ""

but problems here with inverted commas etc..

I've tried a whole bunch of strings but none seem to work, cos I'm just so
damn thick!!!!

and the solution is...step forward people cleverer (great word) than me....
thanks again
VERY VERY frustrating knowing exactly what you want to do but lacking the
skills to do it

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Jason.A.Oliver | last post: by
10 posts views Thread by Bilal | last post: by
4 posts views Thread by sandy | last post: by
3 posts views Thread by manmit.walia | last post: by
3 posts views Thread by Derek Martin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.