Alteryx Designer Desktop Discussions

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

How to run a query in input tool or connect - In DB tool

lumjingbki
8 - Asteroid

Hi I have a SQL query and am able to run the query in SQL studio. However while running in Alteryx both in input tool and connect -in DB tool am getting error. Can you please help. How to configure SQL query with declare variable 

 

Query example:

 

--The query has a declare statement 

declare @input_date as varchar(10)

SET @input_date = '20230723'

 

--and in the rest of the query am trying to drop a table if it exists and create a table then do call the above declared variable in the query 

1 REPLY 1
apathetichell
18 - Pollux

you can drop a table in pre/post sql in an input data tool. I do not believe you can declare/set in those tools - and you definitely cannot in In-DB work. You would reconfigure this in Alteryx where you used other logic to set and test your parameters.

Labels