postgres
postgres copied to clipboard
dynamic column selection with column naming alias is not working
Hi,
i have an array (columnsToSelect) of columns to which i want add another one
columnsToSelect.push("(firstname || ' ' || lastname) as fullname");
SELECT ${sql(columnsToSelect)} FROM ${sql(table)}
I tried different combinations with " and ' but without success.
error:
missing FROM-clause entry for table
Is this possible?
thanks