Having tried to use Google searches to find out what's wrong with my simple WHERE statement, I would like to just ask you users of this forum what's wrong with it:
Code: Select all
SELECT "Customer"."Name", "Address_Line1", "Address_Line2", "Job"."Job_Date", "Job"."Job_Time", "Job"."Hours_Worked"
FROM "Customer", "Job"
WHERE MONTH("Job"."Job_Date") = VALUE(:month);
I assume the input prompt would provide the Integer parameter "Month" as Text, yet having the expression VALUE(:month) in this statement is causing my query to fail, while it works with this expression replaced by an Integer constant and this statement also failed when I replaced VALUE(:month) with just a reference to this parameter in case it was already an Integer value.
Error message:
SQL Status: HY000
Error code: 1000
Syntax error in SQL statement