473,561 Members | 3,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1311
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*a listairb.co.uk> wrote in message
news:vv******** ****@corp.super news.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
27869
by: M Bourgon | last post by:
I'm trying to figure out how to find the last whitespace character in a varchar string. To complicate things, it's not just spaces that I'm looking for, but certain ascii characters (otherwise, obviously, just use LEN). My initial thought was to REVERSE it, find the location (using CHARINDEX) looking for each of those characters (so,...
15
12102
by: Lauren Wilson | last post by:
Access 2K dim MyStr as string What is the maximum amount of text or bytes that this variable can store? Does anyone know?
1
968
by: Darrel | last post by:
In a long series of trouble trying to migrate to 2.0, I'm pretty close to getting it working. My connection string isn't liked by my query function, though. This is what I have: <connectionStrings> <add name="DBConn" connectionString="provider=SQLOLEDB.1;Data Source=;Initial Catalog=;uid=;pwd=" /> </connectionStrings>
14
1336
by: Jason.A.Oliver | last post by:
Okay this will hopefully be my last question for awhile since I've had a bunch over the last few weeks. Thank you all for being patient with me:) Last major obstacle is trying to set up combo boxes in a form that look up values in another table. The idea is that while the user will select a text answer, it will be entered into the table...
10
6021
by: Bilal | last post by:
Hello, I'm trying to perform some string manipulations in my stylesheet and have gotten stuck on the issue below so hopefully can elicit some useful hints. Namely, the problem is that I need to convert an unqualified Xpath to a fully qualified Xpath in an identity transform, i.e. /AAA/BBB/CCC/@DDD
4
493
by: sandy | last post by:
I am trying to upper case a string, so I have this method: string FileSystem::toupper(string S) { for (int i=0; i<S.length(); ++i) { S=toupper(S); } return S;
3
1250
by: manmit.walia | last post by:
Hello All, I have been given a file to convert to C# and being my bad luck the file is written in VB6 which I have no idea on how to convert the file to C#. I first thought that I would try the Visual Studio Wizard to convert it to VB.NET then maybe convert the VB.NET to C#. But when I used the wizard it made it even uglier. Hopefully...
3
1415
by: Derek Martin | last post by:
On Fri, Aug 29, 2008 at 07:28:40PM +0100, dudeja.rajat@gmail.com wrote: if item == '\\': -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D
0
7639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8074
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7926
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3613
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3594
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
885
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.