Dave Day · Jul 15, 2020 go to post

I managed to solve the problem as follows
 

-- current day

WHERE (Timestamp >= {fn CONVERT(CURRENT_DATE,SQL_TIMESTAMP)}
AND Timestamp < {fn CONVERT(DATEADD(dd,1,CURRENT_DATE),SQL_TIMESTAMP)} )

-- previous day

WHERE 
(Timestamp >= {fn CONVERT(DATEADD(dd,-1,CURRENT_DATE),SQL_TIMESTAMP)}
AND Timestamp <  {fn CONVERT(CURRENT_DATE,SQL_TIMESTAMP)});

Dave Day · Jul 9, 2020 go to post

I can't disable quoting of identifiers with the Replicate tool. However, I can run both quoted and unquoted versions of the query successfully with Microsoft SSIS, that is whilst using the same ODBC driver.