Unnest(String_to_array) conversion in oracle
NickName:Shree Naikawadi Ask DateTime:2019-10-23T18:20:37

Unnest(String_to_array) conversion in oracle

I am migrating procedural structure of PostgreSQL code to Oracle. Is there any alternative function present in Oracle for PostgreSQL's unnest(string_to_array)?

select a.finalval
from   (select unnest(string_to_array(vturs_id, ',')) as finalval)

Copyright Notice:Content Author:「Shree Naikawadi」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58520664/unneststring-to-array-conversion-in-oracle

More about “Unnest(String_to_array) conversion in oracle” related questions

Unnest(String_to_array) conversion in oracle

I am migrating procedural structure of PostgreSQL code to Oracle. Is there any alternative function present in Oracle for PostgreSQL's unnest(string_to_array)? select a.finalval from (select unn...

Show Detail

Oracle to PostgreSQL query conversion with string_to_array()

I have below query in Oracle: SELECT to_number(a.v_VALUE), b.v_VALUE FROM TABLE(inv_fn_splitondelimiter('12;5;25;10',';')) a JOIN TABLE(inv_fn_splitondelimiter('10;20;;', ';')) b

Show Detail

Postgres is there a way to simplify my where clause without using unnest and string_to_array?

The following SQL works for me and gives me the results I want: select postdomain from post where postdomain not in (select unnest (string_to_array('youtube.com|twitter.com' , '|'))) ; I am wonde...

Show Detail

plpgsql cursor on unnest function

I have a plpgsql function like: DO $$ DECLARE c_id c.id%TYPE; j_text c.j_options%TYPE; j_option varchar; c1 c%ROWTYPE; begin CREATE TYPE my_row_type AS (c2 TEXT); for --c1 in ...

Show Detail

Get first N array elements from unnest + string_to_array function

I would like to access first 5 elements of an array "ingredients" before UNNESTing the array: SELECT TRIM (REGEXP_REPLACE (UNNEST (string_to_array(ingredients, ';'))[1...

Show Detail

Postgres unnest with points

I'm trying to write a PL/PGSQL function that takes delimited text as input and inserts rows into a table that includes points. I've got a test function that works OK: rowsaz := string_to_array(inpu...

Show Detail

Postgres unnest with points

I'm trying to write a PL/PGSQL function that takes delimited text as input and inserts rows into a table that includes points. I've got a test function that works OK: rowsaz := string_to_array(inpu...

Show Detail

Unnest a column

I have some sql which has some hard coded values which I am trying to replace with values from a database column with pre as ( with a(k, v) as (select id, my_column from mytable), col(s, n) as (s...

Show Detail

Put strings inside quotes with string_to_array()

I am using the following query: WITH a as (SELECT unnest(string_to_array(animals, ',')) as "pets" FROM all_animals where id = 100) select * from a which returns the following data: 1 Cat...

Show Detail

I want to unnest multiple values as columns

select case when subq.status = 1 then unnest( string_to_array('batman,v,superman', ',') ) else null end as something from ( select 1 as

Show Detail