How to use month as a parameter? [message #1384893] |
Mon, 02 June 2014 15:58  |
Eclipse User |
|
|
|
I am working on a report in which the user will need to select a month to query tables and display results for the selected month. The database is Postgres. I have set up parameters so that months are strings containing the month number (example- 01 for January, 04 for April, etc).
Here is my Where clause: WHERE date_part('month',"public"."usage_2014"."date") = ?
If I were to hard code the month it works fine, but when using the parameters I get an error, here's an excerpt from it:
Cannot get the result set metadata. org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object. SQL error #1:ERROR: operator does not exist: double precision = character varying Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Position: 594 ; org.postgresql.util.PSQLException: ERROR: operator does not exist: double precision = character varying Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
What am I doing wrong here?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.29012 seconds