0
votes

I have to convert one Oracle syntax to snowflake. Which is like "table(cast(multiset(select level from dual connect by level <= length(regexp_replace('ABC-EFG-E','[^;]+')) +1 as sys.odciNumberList)) levels"

Could someone please help me with this conversion.

2

2 Answers

1
votes

um, I would say either seqX or generator, depending on what you really need:

https://docs.snowflake.com/en/sql-reference/functions/seq1.html https://docs.snowflake.com/en/sql-reference/functions/generator.html

please note that seqX results are not guaranteed to be sequential and to get real sequence you'll need to apply row_number()

as far as random strings go it's not gonna be too extensive, you can get: https://docs.snowflake.com/en/sql-reference/functions/randstr.html

but that's about it I'm afraid...

0
votes

Post the Equivalent in snowflake , how you have acheived and kindly post the query in snowflake ..so that it will be useful for others