English

How To: Work with NULL values in a table

Summary

Table cells in ArcView can contain a NULL value. This article demonstrates how to create and query NULL values.

Procedure

NULL values for STRINGS can be set with two double quotes ("").
Null values for NUMBER can be set with the request makenull (number.makenull).

  • Use the Field Calculator to set a cell value to NULL.

    1. Make the field containing the cell active.
    2. Use the Select tool to select the cell's record.
    3. Select Calculate from the Field menu.
    4. Type the following expression and click OK.

    For a string field named 'Name':

    Code:
    [Name] = ""

    For a number field named 'Area':

    Code:
    [Area] = number.makenull


    Note:
    The first part of the equation is already listed above the expression box; thus, you only need to type the right hand side of the equation in the expression text box.

  • Use the Query Builder to select records with NULL values.

    1. Select Query from the Table menu.
    2. Type the following into the expression box on the Query Builder dialog box.

    For a string field named 'Name':

    Code:
    [Name].IsNull

    For a number field named 'Area':

    Code:
    [Area].IsNull

  • Use the Query Builder to select records with NON-NULL values.

    1. Select Query from the Table menu.
    2. Type the following into the expression box on the Query Builder dialog box.

    For a string field named 'Name':

    Code:
    [Name].IsNull.Not

    For a number field named 'Area':

    Code:
    [Area].IsNull.Not