Skip to content
Advertisement

Single-row subquery returns more than one row in snowflake

Single-row subquery returns more than one row.

This is the error that I get while running the following snowflake code. I am aware that it is because of the TO_VARCHAR function is not for a whole table column..any idea on how to do workaround and have it applied to the whole column?

I have to change the data type of the table called analytics.dbt_lcasucci.products from int to varchar, since without that the join will not recognize those fields and will just print null values even if the actual content of the cells would be matching.

Advertisement

Answer

You have a wrong subquery in a ON clause ..

and not having aggreagtion function .. you don’t need group by ..eventually use distinct if you don’t want duplicated rows

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement