Every available Microsoft Dynamics NAV data type is mapped to an appropriate SQL Server data type in the tables of the SQL Server Option for Microsoft Dynamics NAV. The following table shows which SQL Server data type is used for the corresponding Microsoft Dynamics NAV data type.

Microsoft Dynamics NAV Data Type SQL Server Data Type

BigInteger

BIGINT

Binary(n)

VARBINARY(n)

BLOB

IMAGE

Boolean

TINYINT

Code(n)

VARCHAR(n), INTEGER, SQL_VARIANT

Date

DATETIME

DateFormula

VARCHAR(32)

Decimal

DECIMAL(38,20)

Duration

BIGINT

GUID

UNIQUEIDENTIFIER

Integer

INTEGER

Option

INTEGER

RecordID

VARBINARY(n)

TableFilter

VARBINARY(252)

Text(n)

VARCHAR(n)

Time

DATETIME

Each of the SQL Server data types is created as NOT NULL except the IMAGE type, which allows NULL.

There are other SQL Server data types than those listed in the previous table. You can use and modify these from within Microsoft Dynamics NAV when you have created or altered SQL Server tables or views outside Microsoft Dynamics NAV.

Some of the SQL Server data types listed previously are compatible with other Microsoft Dynamics NAV data types. The following table shows the extended compatibility of SQL Server data types with Microsoft Dynamics NAV data types.

SQL Server Data Type Microsoft Dynamics NAV Data Type

BINARY(n)

Binary(n)

BIT

Integer, Option

CHAR(n)

Code(n), Text(n), DateFormula

INTEGER

Code

NCHAR(n)

Text(n)

NTEXT

BLOB

NUMERIC(p,s), MONEY, SMALLMONEY, REAL, FLOAT(n), DECIMAL

Decimal, Integer, Option, Boolean

NVARCHAR(n)

Text(n)

SMALLDATETIME

Date

SMALLINT

Integer, Option

TEXT

BLOB

TINYINT

Integer, Option, Boolean

UNIQUEIDENTIFIER

Binary(16), Text(36)