Alteryx Designer Desktop Discussions

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

Issue with Declaring a variable in SQL Editer

adam_rafael_18
8 - Asteroid

Hi,

 

I am trying to build a workflow that will end up being uploaded to the server as an analytic app. I am running into an issue where I am trying to create a variable for the date, so that it can be edited by the user on the gallery. When I enter the following code, I run into an error with "Syntax near @". Is there another way to declare this variable?

 

Thanks!

 

 

 

DECLARE @MYDATE DATE
SET @MYDATE = '2023-02-28"

11 REPLIES 11
adam_rafael_18
8 - Asteroid

Appreciate the link and help - unfortunately still breaking there, it's saying 'Day is not a column'

alexnajm
17 - Castor
17 - Castor

Then I would use a Formula tool in Alteryx in between the Text Input and the Dynamic Input to calculate your this date (rather than using the DateAdd function) and pass that through the Dynamic Input as well

Labels