You are viewing limited content. For full access, please sign in.

Question

Question

Custom Query/DateTime Token Problem

asked on July 25

Hello all,

I found a couple threads on here with a similar issue, but I can't seem to resolve it on my end. The issue is I am trying to do a Custom Query with a Date, however the column I am querying is DateTIme. So I created a query that works with a DateTime range if I try it in SQL myself, but not in the Custom Query in Workflow. I've included my query, the token value I am receiving via a Date Token Calculator, and the error I am receiving.

 

Any help would be appreciated.

Thank you!

0 0

Answer

SELECTED ANSWER
replied on July 27

Hi Brian,

Please try to remove the single quote from [Start date] > '@DAYSTART' AND [Start date] <= '@DAYEND'.

 

BTW, what is the connection type of the data source used in the custom query activity? Please refer to here in step 4 and step 5 under custom query for how to use the parameters in the custom query.

Regards,

Qinmei

1 0

Replies

replied on July 25

What's the data type of [Start date] in SQL? Have you tried setting the data types of the parameters instead of leaving it on "Default"?

0 0
replied on July 25

Hey Kevin,
Data type in SQL is DateTime. I've tried changing the parameter to String and DateTime as well. Same error.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.