コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3625 ビュー

i want to extract data from table: product_template field "name" where data is in json format, i want to extract portion of data as below (2nd screenshot) in blue rectangle (without double quotes " ), please help how i can do it? 


i am using PgAdmin4, here are 2 screenshots:



regards


 

アバター
破棄
最善の回答

Hi,

Please try this query,

SELECT name ->> 'en_US' AS product_name FROM product_template;

Output:


Thanks

アバター
破棄
著作者

thanks for help... it works fine.
but, as mentioned, i want it without double quotes " ... how to remove it?
regards

I have updated the answer, please check

著作者

thanks a bunch!!! brillieant !! it saves to write a function. i thought i have to write a function and use replace function to eliminate double quotes.
regards

関連投稿 返信 ビュー 活動
1
5月 25
2438
1
4月 25
3459
1
4月 25
4276
1
4月 25
1763
4
3月 25
6870