473,671 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find empty fields

code green
1,726 Recognized Expert Top Contributor
How can empty fields be detected.
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM products WHERE 
  2. description IS EMPTY
The field may be NULL
or just empty and I suppose even space characters.
Aug 18 '09 #1
5 9631
Delerna
1,134 Recognized Expert Top Contributor
Expand|Select|Wrap|Line Numbers
  1. SELECT * 
  2. FROM products 
  3. WHERE  description IS null OR rtrim(description)=''
  4.  
Aug 18 '09 #2
code green
1,726 Recognized Expert Top Contributor
Thanks Delerna
I figured as much, I do something similar in MySql.
Although I once had a regex that achieved this.

But it may need to be RTRIM(LTRIM(des cription))=''
Aug 19 '09 #3
ck9663
2,878 Recognized Expert Specialist
also...

Expand|Select|Wrap|Line Numbers
  1. WHERE isnull(rtrim(ltrim(description)),'') = ''
  2.  
Aug 20 '09 #4
code green
1,726 Recognized Expert Top Contributor
Expand|Select|Wrap|Line Numbers
  1. WHERE isnull(rtrim(ltrim(description)),'') = '' 
I like that ck9663, although I can't quite see how it works.
It looks like a COALESCE should be there
Aug 20 '09 #5
code green
1,726 Recognized Expert Top Contributor
Got it. isnull() function rather than IS NULL
Aug 20 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

19
10911
by: David Logan | last post by:
We need an additional function in the String class. We need the ability to suppress empty fields, so that we can more effectively parse. Right now, multiple whitespace characters create multiple empty strings in the resulting string array.
1
3817
by: Shaggers | last post by:
I need to hide/not display a blank row on a subform. The Main form is based on a table, contains Site Header information The Subform is based on another table containing Sample Details records Site Header table to Sample Details table relation ship is one-to-many, with two key fields SiteID and SiteVisitDate The Form/SubForm is linked by SiteID, SiteVisitDate The form adds one record to the Site Header Table.
2
1927
by: Viktor | last post by:
I have a problem with counting empty fields in table. For example: I have the field in which i coulld write several solutions. "done", "not done", "send", "not send" etc. In report i want to count how many records in that filed is empty and the records which have written any solution in that filed. I would be grateful for any solution.
1
1601
by: naboumerhi | last post by:
Hi, I have a a custom report trying to hide empty fields and shift the next field up. It still shows and empty space. Example: company1 company2 company3
13
2620
by: elsheh | last post by:
Hi.. guys I’m trying to use JavaScript to validate my HTML for empty fields. My code is as below. The problem is that I can escape validation and submit empty fields. Any clue? <html> <head> <script language="JavaScript"> function isEmpty(inputStr,fieldname){ if (inputStr==null || inputStr==""){
4
7815
by: Eric Layman | last post by:
Hi everyone, I noticed that customevalidator won't work with empty fields. But I do not want to put in another requiredfieldvalidator Any workarounds? I've tried if args.Text.trim.length() = 0 then
5
2502
by: Phaelle | last post by:
In my database, some fields are empty for some recordings. And I wouldl like that the empty fields don´t appear on the answer page of my search engine or, in other worlds, that I don´t have that kind of things (ie age without anything): Surname : Sawers First name : Tom Age: Nationality : American Thanks a million!
15
9890
by: JFKJr | last post by:
Hello everyone, I have imported an excel file into an Access table, but the table contains some empty fields, does anyone know how to delete those empty fields using Access VBA? Thanks in Advance.
3
3237
by: FKlusmann | last post by:
I have inherited a big, messy table with duplicated data and empty fields consisting of Names (business, client, supplier, etc.), Addresses ( physical, mailing, shipping, billing), Orders ( Date, item, quantity, price, shippedby, shipdate, shipcost), etc.. I wish to "normalize" this without loosing data. MainTable.ID -> NamesTable (NameID, NameType, LName, FName, etc....) -> AddressTable (AddressID, Type, Line1, Line2,...
0
8473
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8911
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8667
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2808
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
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1806
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.