In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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
20 - Arcturus

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
Top Solution Authors