Hi,
I am trying to execute SQL query in my input tool which takes the data from redshift connection and a column name with spaces. I have enclosed them with quotes example shown below but desktop designer still is not able to detect the column. Please help
select distinct (schema.table."Column id"),
from schema.table;
Error SQLPrepare: [Simba][Amazon Redshift] (30) Error occurred while trying to execute query: [SQLState 42703] Error: schema.table."Column id" does not exist
How about if you just use do this and have an alias: select distinct "Column id" from schema.table.
If this works, accept my answer as the solution.
I use Oracle with Alteryx (not RedShift) and there is no fields which contain space in its column name.
But I suppose you can use "Visual Query Builder" in Input Data Tool which supports you build a correct SQL syntax on GUI basis.
So I would recommend you use the UI if it is available.
I hope this helps.
Stack overflow's recommendation is to use escape characters: