SSC-EWI-OR0121

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

circle-info

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 Documentationarrow-up-right

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

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 typearrow-up-right.

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

Last updated