I'm running Visual Studio 2017 on Windows 7. Since part of my day involves Oracle work, I added an Oracle db to Server Explore in VS. Works fine!. Tried a simple query:
SELECT 1 AS ONE FROM DUAL
which works fine. Then just for fun I tried this:
SELECT trunc(sysdate - 1)
FROM DUAL
I found that VS rewrites this as:
SELECT        trunc("sysdate" - 1) AS EXPR1
FROM            SYS."DUAL"
Which fails, unsurprisingly. Anyone know how to stop VS from rewriting my queries?
Please try changing SYSDATE to CURRENT_DATE in your query and see if it helps. 
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With