

The values are sorted the same way whether they are sorted as characters or as numeric values. The following are examples of fixed length numeric series: You can do this in the following ways:ĭefine a numeric series that consists of a predefined number of digits that start with a digit other than zero. To avoid sorting problems with code fields, we recommend that you use a numeric series that has a fixed length. For more information about these constraints, see SQL Data Type Property. Storing a code field as an Integer, BigInteger, or Variant introduces additional constraints on the data in the field. You can change the SQL Data Type property to specify that a code field is stored as an Integer, BigInteger, or Variant instead of a Varchar. The following table illustrates the differences that occur in sorting as numeric values and sorting as text. Nvarchar data types are sorted as if they are text strings. By default, code fields are stored in Microsoft SQL Server using the nvarchar SQL data type.

Number SortingĬode fields in tables can contain both numeric values and text strings. This topic explains how items, such as documents, are numbered in Dynamics NAV.
