Free Trial

Alteryx Designer Desktop Discussions

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

In DB macro error - either data type errors or no results

Seanpsmith00
5 - Atom

I have an In-DB query with a WHERE clause that's A.ClosingDate >= '2021-01-01' and I'm using a Date Select tool and Action to modify '2021-01-01' in the Connect In-DB tool. I then I have a Filter In-DB tool with a custom filter "ClosingDate" <=  '2021-12-31' with a Date Select tool and Action to modify '2021-12-31'. 

 

The macro runs perfectly fine and gives correct results when run within the macro but if I then use it in a workflow I get the error "Conversion valued when converting the varchar value.....to data type int".   If I use any variation of Convert(varchar, A.ClosingDate, 23) or Cast(A.ClosingDate as varchar) to get the error to go away, the macro still runs perfectly within the macro file but will then return zero results when run within a workflow.  

 

If I try and Cast/Convert everything to data type date, I get an error converting the value from Date Select tool into a date (doesn't make any sense to me).

 

I also know it's a problem with the Date Select tool with an Action on the In-DB filter because if I remove that and just have a hard-coded date, the macro works when used in a workflow.

1 REPLY 1
apathetichell
19 - Altair

Can you show us a screen grab of your action tool configs? I can't tell anything from that .png.

Labels
Top Solution Authors