%sql fails when query contains a Negative number
feverittm opened this issue · 2 comments
feverittm commented
When running a valid sql comment that has a negative integer as an argument:
%sql SELECT DATEADD(month, -2, SYSDATE)
It returns an error:
UsageError: unrecognized arguments: -2, SYSDATE)
If you make the '-2' a string and cast it to an INT then it works:
%sql SELECT DATEADD(month, '-2'::INT, SYSDATE)
Works.
acountrec commented
have the same issue
duncandewhurst commented
Another workaround is to remove the space before the '-': %sql SELECT DATEADD(month,-2, SYSDATE)