NULL Record

Discussion in 'ASP General' started by Olivia Towery, Jul 31, 2003.

  1. 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
     
    Olivia Towery, Jul 31, 2003
    #1
    1. Advertising

  2. Select * from User_Accounts where Email = ''

    * * * Sent via DevBuilder http://www.devbuilder.org * * *
    Developer Resources for High End Developers.
     
    Andrew Durstewitz, Jul 31, 2003
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > 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
    >
    >
     
    Aaron Bertrand - MVP, Jul 31, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SnVzdGlu?=

    Retrieving Record Key while creating the record.

    =?Utf-8?B?SnVzdGlu?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    649
    =?Utf-8?B?SnVzdGlu?=
    Oct 5, 2004
  2. Replies:
    5
    Views:
    26,938
    Mike Schilling
    Mar 29, 2006
  3. André
    Replies:
    0
    Views:
    3,761
    André
    Jun 25, 2006
  4. MRW
    Replies:
    0
    Views:
    391
  5. THurkmans
    Replies:
    2
    Views:
    617
Loading...

Share This Page