I am writing a fairly simple SQL query that sits in a Dynamic Query tool. The column that I need to by "dynamic" is called the JV number. The JV number has leading zeros in it that need to be stripped out in order for the dynamic query to work. JV number comes in as a string. Ultimately, I want to convert it to an integer (to strip the leading zeos) and then back to a string. I have tried both cast and convert, and both of these return "No Columns Returned".
CAST(jointventure as INT) as "JV Trimmed"
Convert(jointventure) as "JV Trimmed"
Please note, I know how to perform this function with a formula tool using TrimLeft, but I need the leading zeros to be removed in the SQL query.
Does CAST not work in Alteryx or is there something I am doing wrong?
Thanks in advance!