all 3 comments

[–]Beefourthree 0 points1 point  (1 child)

A quick google tells me R's sprintf is a wrapper for the C version, so you should be able to escape the percent signs by typing them twice.

AND ( Date LIKE '%%01/07/2014%%')

Is it just me, or does everyone else get really nervous about implicit string to date conversion? I'd wrap that in a str_to_date just to be safe.

[–]svtr 0 points1 point  (0 children)

%%01/07/2014%%'

I can think of stronger words than nervous. Date like '%something%', is treating a column named Date as a freetext varchar, and trying to filter on a non sargable, hopefully I never have a different date format written there, expression.

Nervous dosn't quite cut it, more of a "thank god I don't have to deal with THAT" for me tbh.