Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Converting SQL Statement for use in Designer

CherylWalsh71
7 - Meteor

Hi,

I am having issues with a SQL statement that I generally run via Microsoft SQL Server.  When I put the SQL into the designer I am getting an error. It does not like the a. b. c. reference.  I was wondering if anyone knows how I should write this to pull data?

 

select a*
from dim_customer_account a,
    dim_territory b, 
    dim_territory c
where a.current_primary_territory_sk = b.territory_sk /* for primary rep assignment*/
and a.current_secondary_territory_sk = c.territory_sk /* for secondary rep assignment*/

 

Thanks

4 REPLIES 4
gabrielvilella
14 - Magnetar

Don't you need the AS, like:

SELECT column-name FROM table-name AS alias-name

 

CherylWalsh71
7 - Meteor

Thank you.  I will try that.

CherylWalsh71
7 - Meteor

Hi Gabrielvilella, 

I have tried this a few times but have still been unsuccessful. Any other ideas?

gabrielvilella
14 - Magnetar

May be SQL code is not correct. You are selecting from three different tables, with no join. Not sure if this is possible.