SSC-FDM-OR0004
Siblings keyword removed from the order by clause because Snowflake does not support it.
Description
In Oracle, the ORDER BY SIBLINGS clause can be used in hierarchical queries to preserve the order of the data given by the hierarchy, while applying a reorder of the values that are siblings in the same hierarchy. This is not supported in Snowflake.
Example Code
Input Code:
Output Code:
While the exact same ordering achieved with the SIBLINGS clause might not be accessible, there are a few alternatives to get a similar result.
Embed the query within an outer query that applies the desired sorting using
ORDER BY
.Create a CTE with the hierarchical query using
CONNECT BY
and reference the CTE in a subsequent query to applyORDER BY
for sibling sorting (rows at the same level).
If you need more support, you can email us at snowconvert-support@snowflake.com
Last updated