MSCEWI4069

CURRENT_DATABASE function has different behavior in certain cases.

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

Severity

Low

Description

This EWI is added when the function DB_NAME is transformed to CURRENT_DATABASE because Snowflake does not support the database_id parameter and the CURRENT_DATABASE function will always return the current database name.

Input Code:

SELECT DB_NAME(someId);

Output Code:

SELECT
CURRENT_DATABASE() /*** MSC-WARNING - MSCEWI4069 - CURRENT_DATABASE function has different behavior in certain cases ***/;

Recommendations

Last updated