473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Find empty fields

code green
1,726 Expert 1GB
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 9619
Delerna
1,134 Expert 1GB
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 Expert 1GB
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(description))=''
Aug 19 '09 #3
ck9663
2,878 Expert 2GB
also...

Expand|Select|Wrap|Line Numbers
  1. WHERE isnull(rtrim(ltrim(description)),'') = ''
  2.  
Aug 20 '09 #4
code green
1,726 Expert 1GB
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 Expert 1GB
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
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...
1
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 ...
2
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...
1
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
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> ...
4
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...
5
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...
15
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
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...

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.