Viewing 3 posts - 1 through 3 (of 3 total)
Thank all for your comments and ideas. Came up with this after reading a post to codeplex on escaping 's. Turns out the magic use of "'"s is.
'[dtmDocDate] >= CONVERT(datetime,...
March 29, 2021 at 4:19 pm
SET @whereClause = [dtmDocDate] >= DATEPART(dy, '2020-09-01')
AND
SET @whereClause = [dtmDocDate] >= DATEPART(dy, 2020-09-01)
both receive errors on execution
Also tries with 's on beg and end of statement as the whole statement...
March 28, 2021 at 5:54 pm
Yes, most definitely.
Since my last post I tried:
SET @whereClause = '[dtmDocDate] >= DATEPART(dy, 2020-09-01)'
with the same result.
However, I think I have discovered the underlying issue. The script of which this...
March 28, 2021 at 1:52 pm
Viewing 3 posts - 1 through 3 (of 3 total)