How to append value of column with double quotes (add quotes around string)
13
votes
1
answer
63280
views
I have a table with a column that is TEXT type. In the column are numeric characters. What I'm trying to achieve is to wrap those characters in double quotes.
EXAMPLE:
NAME ID QTY
Apples A1 1
Oranges O1 1
Foo F1 0
IDEAL OUTPUT:
NAME ID QTY
Apples A1 "1"
Oranges O1 "1"
Foo F1 "0"
I attempted to run the following SELECT statement but it didn't give me the result I was expecting. Perhaps you can guide me in the right direction?
SELECT
qty
, CHAR('"'|| qty ||'"')
FROM myTable
;
Thank You
Asked by Bard
(133 rep)
Aug 19, 2014, 06:51 PM
Last activity: Mar 9, 2022, 09:31 PM
Last activity: Mar 9, 2022, 09:31 PM