跳至內容
選單
此問題已被標幟
1 回覆
3611 瀏覽次數

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
2433
1
4月 25
3451
1
4月 25
4271
1
4月 25
1754
4
3月 25
6859