SSC-EWI-OR0121

Using DBMS_LOB.SUBSTR built-in package with a BFILE column is not supported in Snowflake

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Severity

Medium

Description

Oracle BFILE columns are migrated to VARCHAR in Snowflake. The file name is stored as a string in the new column. Therefore, using a SUBSTR function, in Snowflake, on the migrated column will return a substring of the file name. While Oracle DBMS_LOB.SUBSTR will return a substring of the file content. For more information review BFILE data type.

Example Code

Input Code:

IN -> Oracle_01.sql
CREATE TABLE table1
(
    bfile_column BFILE
)
SELECT 
DBMS_LOB.SUBSTR(bfile_column, 15, 1)
FROM table1;

Output Code:

Recommendations

  • Review the documentation for handling files with Snowflake here.

  • If you need more support, you can email us at [email protected]

Last updated