MSCEWI2019

Converted from integer to varchar for current session default.

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Low

Description

This message is shown when SnowConvert finds a DEFAULT SESSION and the data type is NOT a VARCHAR. If that is the case, the data type is changed to VARCHAR and a message is added.

Code Example

Input Code:

CREATE TABLE TableExample
(
ColumnExample INTEGER DEFAULT SESSION,
ColumnExample2 VARCHAR DEFAULT SESSION
)

Output Code:

CREATE TABLE PUBLIC.TableExample
(
ColumnExample VARCHAR DEFAULT CURRENT_SESSION() /*** MSC-WARNING - MSCEWI2019 - CONVERTED FROM INTEGER TO VARCHAR FOR CURRENT_SESSION DEFAULT ***/,
ColumnExample2 VARCHAR DEFAULT CURRENT_SESSION()
);

Let's take a look at the example. Note that ColumnExample has a data type INTEGER with DEFAULT SESSION. Since the data type is not VARCHAR, in the output it is transformed to VARCHAR.

The data type of ColumnExample2 doesn't change since it is already VARCHAR.

Recommendations

Last updated