Search
 
SCRIPT & CODE EXAMPLE
 

SQL

json array to string in postgresql

	SELECT string_agg(trim(tdata::text, '"'), ', ') from jsonb_array_elements(CAST('[1 , 2]' as jsonb)) tdata
Comment

postgres json to string

SELECT CAST( json_column AS TEXT ) FROM table
or
SELECT json_column::TEXT FROM table
Comment

json array to string in postgresql

SELECT 
	ID
	,(
		SELECT string_agg(trim(JsonString::text, '"'), ', ')
		FROM jsonb_array_elements(JsonData->'Name') JsonString
	) AS StringArray
FROM   tbl_TestJsonArray;
Comment

PREVIOUS NEXT
Code Example
Sql :: drop index in sql 
Sql :: cannot drop database because it is currently in use 
Sql :: SQL CREATE UNIQUE INDEX for Unique Values 
Sql :: concat column data in sql laravel 
Sql :: sql manhattan distance 
Sql :: mysql on update current_timestamp 
Sql :: create a view in sqlite 
Sql :: select nextval from sequence sql 
Sql :: sql create schema 
Sql :: phpmyadmin reset root password 
Sql :: create sequence postgres 
Sql :: restart sql server command line linux 
Sql :: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file 
Sql :: ascending order mysql 
Sql :: CALCULATING MONTHS BETWEEN TWO DATES IN POSTGRESQL 
Sql :: mysql store ip address 
Sql :: mysql full outer join 
Sql :: mysql isnull 
Sql :: mysql backup table 
Sql :: mysql connection w3 
Sql :: restore database postgresql 
Sql :: rename a table in sql server 
Sql :: add colum date in sql 
Sql :: mysql add column to table 
Sql :: oracle locked objects 
Sql :: sql update insert and delete 
Sql :: primary key multiple colums 
Sql :: como saber si tengo mysql instalado 
Sql :: sql constraint check value in list 
Sql :: set value to null sql 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =