Hi All,
Am running ASP/MySQL setup and have the below select statement. Its failing on the case when then structure as below
Is it the location of the case when then items, or a syntax issue?
Bastien
I wish my computer would do what I want it to do,
instead of what I tell it to do...
Am running ASP/MySQL setup and have the below select statement. Its failing on the case when then structure as below
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.16-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'case end, case when Merchandise_Damaged is null then 'No' else
Code:
SELECT Case_Number,Restitution_id, Civil_Demand_ID, Personal_id, system_hierarchy.Node_Label, system_hierarchy.Loc_State, Case_ID, Apprehension_Date case_type, case when disposition ='Prosecuted' then 'True' else 'False' case end, case when Merchandise_Damaged is null then 'No' else 'Yes' end case, Merchandise_Admission, merchandise_id FROM case_info inner join system_hierarchy on case_info.search_target = system_hierarchy.node_address WHERE case_info.Case_Approved = 'Yes' AND case_info.Rest_Handled IS NULL AND case_info.Record_Deleted = 'NO'...
Is it the location of the case when then items, or a syntax issue?
Bastien
I wish my computer would do what I want it to do,
instead of what I tell it to do...