Data Types » Data type and format type compatibility

Data type and format type compatibility

If you change the MicroStrategy data type of one of the columns in your project—using a column alias, for example—you must also change the format type of the attribute. The data type of your column must be consistent with the format type you select because SQL generation issues can occur if the format type and data type are incompatible. You are warned in the Attribute Editor whenever you have selected a format type that is incompatible with the data type of your column.

For example, you edit the ID form of the Year attribute in the Attribute Editor. In the Column Alias tab, you notice that the Year attribute is assigned an “Integer” data type. However, you create a new column alias and assign it the “Date” data type.

When you return to the Definition pane in the Attribute Editor, you must select an appropriate format type from the Form Format: Type drop-down menu. This format type must be compatible with the data type you assigned in the Column Alias tab. If you select a format type that is incompatible with the data type and click OK to exit the Attribute Editor, a warning message appears notifying you of the incompatibility. Although you have the option to continue by clicking Yes, doing so can still result in SQL generation issues.

The following chart is intended to guide you in assigning format types that are compatible with the data type you have assigned to a column.

Different format types are compatible with different data types given the specific data in your column. Therefore, some of the data type-format type combinations below may not work with your specific data.

Data Type

Compatible Format Types

Big Decimal

Big Decimal

Binary

Number, Text, Picture

Char

Text, URL, E-mail, HTML Tag

Date

Date, Datetime

Decimal

Number

Double

Number

Float

Number

Integer

Number

LongVarBin

Picture, BLOB, Text depending on data

LongVarChar

Picture, Text

Numeric

Number

Real

Number

Time

Time, Datetime

Timestamp

Datetime, Date or Time depending on data

Unsigned

Number

VarBin

Picture, Text

VarChar

Text, URL, E-mail, HTML Tag, Picture