PROBLEM

Selecting by attributes on a float item returns no records

Last Published: April 25, 2020

Description

Selecting by attributes on a float type does not return any records. Clicking Verify to make sure the expression is correct returns:

The expression was executed successfully, but no records were returned.

Cause

Floating point numbers are stored in machine precision. Machine precision stores more significant digits than are shown in the unique values window.

Integer data stores whole numbers, while floating-point data contains numeric values with a decimal portion. Issues may arise if the float item's values are between 0 and 1. These values after the decimal place become lost and the values become truncated.

Solution or Workaround



  1. Add a numeric field to the attribute table in ArcCatalog.

    Summary:
    How to add a new field/item to a coverage feature attribute table using ArcCatalog.

    Procedure:


    1. Right-click the feature class to add a new field to. Click Properties.
    2. Select the Items tab on the Coverage Feature Class Properties window.
    3. Click Add. Define the Item properties in the Add Item window.
    4. Click OK in the Add Item window.
    5. Click OK in the Coverage Feature Class Properties window.

  2. Calculate the new field equal to the floating point field. This produces rounded results to a usable precision.

    Summary:
    After adding a new field to a coverage attribute table, that field can be populated based on values contained in existing fields. Instructions provided describe how to calculate the values of one field to another field of a coverage.

    In Workstation ArcInfo, use CALCULATE or MOVEITEM in ArcEdit, ArcPlot, or INFO. In Desktop ArcInfo, use the Field Calculator as shown below.

    Procedure:


    1. Prepare coverage for editing.

    A. Start an ArcMap session.
    B. Open the coverage.
    C. Click the layer in Table of Contents (TOC).
    D. Click Start Editing in the Editor toolbar.

    2. Open the Field Calculator on the field to be populated.

    A. Right-click the layer in the TOC.
    B. For all records, if nothing is selected, click Open Attribute Table.
    C. For selected features, click Selection. On the pop-up menu, click 'Open table for selected features'.
    D. Find the desired item.
    E. Right-click the field name.
    F. On the pop-up menu, click Calculate Values to bring up the Field Calculator menu.

    3. Define the calculation.

    A. On the Field Calculator menu, check a button for the desired calculation to perform (Number, String, Date).

    B. Click the source item in the Fields window. The source item name and the target item appear in the Field Calculator.

    C. Click OK. All the values of the source item appear in the target item.



    [O-Image] [O] ArcMap Field Calculator image

    4. Stop Editing and save edits.

    Use the Properties of the layer in ArcCatalog to add new items. See Chapter 10 of the "Using ArcMap" tutorial for more information.


Article ID:000002480

Software:
  • ArcMap 8 x
  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic