This is an extension of this question: SQLite problem selecting two columns as one
How would I combine the two columns if there is a space in the column name?
This works:
SELECT (column1 || " " || column2) AS expr1 FROM your_table;
This does not:
SELECT (column 1 || " " || column 2) AS expr1 FROM your_table;
Try this:
SELECT ("column 1" || ' ' || "column 2") AS expr1 FROM your_table;
OR this
SELECT ([column 1] || ' ' || [column 2]) AS expr1 FROM your_table;
OR this
SELECT (`column 1` || ' ' || `column 2`) AS expr1 FROM your_table;
Per the SQLIte documentation, you use single quote for strings, and double for identifiers, but you have the other options for compatibility
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With