471,830 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,830 software developers and data experts.

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 1274
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
NeoPa
reply views Thread by NeoPa | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.