I am trying to export data from a derby table to a file. I'm having issues with the WHERE
clause. What I have is this.
s.execute("CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY('SELECT *FROM REPORT WHERE DATE = " + conversion.getDate() + " ' , 'C:\\Pos\\daily_report.csv' , ',' , null, null)");
This exception
Java.sql.SQLSyntaxErrorException: Syntax error: Encountered "Sep" at line 1, column 37.
was thrown while evaluating an expression.
Could someone direct me regarding this.
I found it.
s.execute("CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY('SELECT*FROM REPORT WHERE DATE = ' ' " + conversion.getDate() + " ' ' ' , 'C:\Pos\daily_report.csv' , ' , ' , null, null)");