Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to Stop Alteryx from Appending Table Name to Column Names in SQL Query

richarty
6 - Meteoroid

Hello all,

 

 

Simple problem here. Whenever I use any DB connect tool (generally the standard input tool or dynamic input) and write a SQL query, Alteryx has an incredibly annoying habit of appending the table name to each column name in my query.

 

 

Simple example of a simple query:

 

select source_program_no, program_no from programs where source_program_no in (1234)

 

Note that we have many tables in the DB where these columns are shared, and I would normally just switch the main table it's pulling from--however, Alteryx does this:

 

Select programs.source_program_no, programs.program_no From programs Where programs.source_program_no In (1234)

Which not only makes it hard to read, but now I can't switch the main table name without switching EVERY table name.

 

 

This used to not happen in some 10.x versions of Alteryx, but after upgrading a couple times (and now being into 11.x)--I was hoping that this issue would resolve itself, but unfortunately it hasn't.

 

Does anyone have a solution for preventing Alteryx from doing this to my queries? This is just a simple example, so this doesn't even show how crazy my huge queries get, where it not only appends the table names, but it also removes all spatial formatting and flattens my query--essentially rendering it as an unreadable block of text.

 

 

Any help would be greatly appreciated.

2 REPLIES 2
PaulT
Alteryx Alumni (Retired)

Greetings,

 

The issue that you're encountering here is in part due to the Visual Query Builder and how it manipulates code to create the desired result. If you would like to maintain your own SQL without the additions. I recommend you open your Query Builder and choose the SQL Editor tab and check the box to open on that tab by default. This will prevent your SQL from opening via the Visual Query Builder and leave your SQL code unaffected by changes enforced by the Visual Query Builder.

 

8-8-2017 2-20-16 PM.jpg

richarty
6 - Meteoroid

Paul,

 

Thank you! That was it. Thanks a bunch for your help. I'm glad that it was something fairly simple.

Labels