473,597 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NULL Record

How do I write select statement to choose records with a specific field that
is NULL? Example - I want to select all records who do not have any email


Olivia Towery
Tower Internet Management
Phone - 909.652.8064
Fax - 909.652.8068
Cellular - 619.454.5005
Jul 19 '05 #1
2 3819
Select * from User_Accounts where Email = ''

* * * Sent via DevBuilder http://www.devbuilder.org * * *
Developer Resources for High End Developers.
Jul 19 '05 #2
If it is only NULL:
SELECT columns FROM table WHERE email IS NULL

If it is NULL or empty string:

SQL Server
SELECT columns FROM table WHERE COALESCE(RTRIM( email), '') = ''

Access, maybe this?
SELECT columns FROM table WHERE NULLIF(email, '') = ''
*ALWAYS* useful to post the database you're using and the version...

"Olivia Towery" <pr*****@timweb s.com> wrote in message
news:OR******** ******@TK2MSFTN GP11.phx.gbl...
How do I write select statement to choose records with a specific field that is NULL? Example - I want to select all records who do not have any email


Olivia Towery
Tower Internet Management
Phone - 909.652.8064
Fax - 909.652.8068
Cellular - 619.454.5005

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: allyn44 | last post by:
Hello, I have a table that has null fields that need to be filled in with the value of the previous record (example below) id date 1 2/2/02 2 3 4/4/02 4
by: jannordgreen | last post by:
The form 'Client Records' has this record source: SELECT ., .LastName, .FirstName, .Company, .Address, .City, ., .State, .Country, .WorkPhone, .FaxNumber, .EmailAddress, .Business, .Origin, ., .Interest, .Other, ., .Notes FROM WHERE (((.Origin)=Nz(!.,""))); When I call the form 'Client Records' from another form with
by: Susan Bricker | last post by:
Hi. I'm back again with another brain-buster (for me). I am getting "Invalid use of Null" with an error number of 94 for the following ... 1. Form based on a table (tblPeople) 2. The people record contains name (firstname, lastname, middle initial, name suffix) fields, address fields (addressline1, addressline2, city, state, zipcode, country), and some other fields (email address, phone number, various on/off switches to indicate...
by: Daniel Martini | last post by:
Hi all, I'm currently coding some functions in plpgsql for generating reports out of records in a table. Problem is: NULL values in records make the complete function fail. Here is a simple test case (original is more complex with a multi- table query in the for qres in select... part): create table test( id serial,
by: Federico Balbi | last post by:
Hi, I was wondering if PGSQL has a function similar to binary_checksum() of MS SQL Server 2000. It is pretty handy when it comes to compare rows of data instead of having to write long boolean expressions. binary_checksum() takes a list of fields and it returns an integer value which sumarize the row content. Thanks, Fed
by: Brett | last post by:
My database has 2 tables: Table1 & Table2. If a field is not null on a record in table2, then the not null fields in table1 that correspond to the records in table1 needs to be updated to match the field in table2. What I have is a form that is linked to Table2. If the users want to change a field in the main database (table1), they fill the change in to the form (which is linked to table2) If there is no change to the field, they simply...
by: Paul Lautman | last post by:
I have the following switch statement: switch ($record->sub_page) { case -1: $this->page = 6; $error_message = '<center>You appear to have already completed the form.</center>'; break; case 0: $this->page = 5;
by: hardieca | last post by:
Hi, My formview or gridview control stops updating or deleting a record once the record has a null value. I have table tblTest with the following pkID int NOT NULL **IDENTITY COLUMN** string1 varchar(30) string2 varchar(30)
by: Debbiedo | last post by:
I searched the groups and tried several approaches but still cannot find a solution. I have a table that has several hundred fields that may or may not need to be displayed in a report, depending on whether they are NULL or not. (Due to limitations of out software, the table needs to be designed this way) The data needs to be displayed like this:
by: BobLewiston | last post by:
Some of you may have seen my earlier thread “PasswordHash NULL problem”. I’ve started a new thread because investigation has shown that the problem is actually quite different than I previously stated. Also please note that this is unrelated to another of my previous threads, “dataAdapter.Update problem”, which incidentally has been resolved. I’m learning SQL. I’m accessing database SQL2008 AdventureWorks, table Person.Contact, which has a...
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...
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...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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...
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...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.