I would like to use an sql statement to load data to Alteryx that contains a variable for a table, e.g.:
Hi @mikucera ,
Yes, the coding in SQL is really clumsy compared to Alteryx. You can simply connect your data source, select the table or tables you want and you can then join them in the visual query builder:
Or pull them into Alteryx and use the simple drag and drop tools:
M.
You can put this is in a macro and feed in the table value as a parameter, either generated by logic, or selected via an interface tool (text input, dropdown etc.) but is there any reason you're using a SQL statement rather than just using Alteryx?
Can you give us a bit more info?
Hi @mceleavey ,
the sql query that I'd like to use to load the data is quite long with many joins and I found using joins in Alteryx not very user friendly so inputing this as a sql code would be much easier in the context of all the remaining parts of the whole workflow that will consist of other data inputs.
I will explore the alternative options, or I'll just use the sql code without the variable.
Many thanks,
Michal
I too would love to be able to figure out how to use DECLARE and SET in Alteryx's SQL Editor. I always prefer command lines over GUIs and find SQL much more efficient for coding, then I just use Alteryx to automate the extraction and distribution of the data.
Is there an answer to this that Alteryx can or cannot read the SET and DECLAR parts of a SQL query? I know the functionality can be done via macros/dynamic input, etc but I have some users that are new to Alteryx, have variable declarations in their SQL queries, and I would prefer that they modify their original queries as little as possible if necessary