SSC-FDM-TS0010

CURRENT_DATABASE function has different behavior in certain cases.

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.

Code Example

Input Code:

IN -> SqlServer_01.sql
SELECT DB_NAME(someId);

Output Code:

OUT -> SqlServer_01.sql
SELECT
CURRENT_DATABASE() /*** SSC-FDM-TS0010 - CURRENT_DATABASE function has different behavior in certain cases ***/;

Recommendations

Last updated