This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I am experiencing an issue with executing my SQL store procedure by passing date parameter.
First issue i face is my parameter in the SP is @CreatedDate and the data type is see in SQL (SSMS) is Date but when I am calling the same SP in Alteryx its showing me as WString, I am not sure why the data type changes.
2. Second thing is I am not able to run the Store procedure, I am entering the value next to Datatype in the above window but it throughs an error as below
Could anyone please help me in resolving this issue? Thanks in advance.
You didn't specify which database you're using but if it's SQL Server your Date parameter needs single quotes around it
Your second error is caused by a bug in the "Choose Table or Specific Query" window. When you make changes, the space between the procedure name and the 1st parameter gets taken out. "Test_V2_Alteryx 2019-01-01" becomes "Test_V2_Alteryx2019-01-01" with no space between the x and 2. Click on "SQL Editor" button and add the space back in.
I have added an empty space and put the value inside quotes but now I receive a different error and moreover Could you please tell me why does the data type still remain in W-string and not changes to date. Please find the attached error I get after correcting the space and having them inside quotes. Thanks again.
Thanks for the link DiganP, I followed steps Danilang and you suggested and it seems to be fine but I am still not sure why the datatype remains in W-String and not Date but my SP is created such that the Parameter is date. Should I change anything in my SQL query. I am receiving a new error now and I have attached the same. Thanks for your help.