Re: [GENERAL] Unnest an array in postgresql

2016-10-20 Thread David G. Johnston
On Thu, Oct 20, 2016 at 2:40 AM, Jaisingkar, Piyush < piyush.jaising...@nttdata.com> wrote: > Hello, > > > > > > I am trying to run following query in a function: > > > > > > CREATE TEMP TABLE temptable on commit drop as (Select * from > unnest(string_to_array(temp1,',')) as (rep_id int,install_up

Re: [GENERAL] Unnest an array in postgresql

2016-10-20 Thread Jaisingkar, Piyush
Hello, I am trying to run following query in a function: CREATE TEMP TABLE temptable on commit drop as (Select * from unnest(string_to_array(temp1,',')) as (rep_id int,install_uprn varchar,address text,postcode varchar)); Where temp1 is an string and looks like this: {"(20812,,BND11TN-H1,P

[GENERAL] Unnest an array in postgresql

2016-10-20 Thread Jaisingkar, Piyush
Hello, I am trying to run following query in a function: CREATE TEMP TABLE temptable on commit drop as (Select * from unnest(string_to_array(temp1,',')) as (rep_id int,install_uprn varchar,address text,postcode varchar)); Where temp1 is an array and looks like this: {"(20812,,BND11TN-H1,PL