Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Unable to Execute SQL Query with Column Spaces

tgawade
6 - Meteoroid

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

 

3 REPLIES 3
Warcry
9 - Comet

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.

 

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

@tgawade 

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.image.png

So I would recommend you use the UI if it is available.

I hope this helps.

apathetichell
20 - Arcturus
Labels
Top Solution Authors