473,699 Members | 2,215 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
listed.

Thanks,

--
Olivia Towery
Tower Internet Management
Phone - 909.652.8064
Fax - 909.652.8068
Cellular - 619.454.5005
Jul 19 '05 #1
2 3820
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
listed.

Thanks,

--
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

1
3886
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
5
3218
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
5
4880
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...
1
2257
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,
13
8702
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
2
19603
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...
13
2561
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;
0
1879
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)
4
1701
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:
2
3875
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...
0
8700
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...
1
8931
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,...
0
8892
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...
1
6539
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...
0
5878
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();...
0
4386
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...
0
4635
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2014
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.