I am trying to run a query from Crystal Reports using a max SQL command. All I get is a syntax error. The code is below:
SELECT DISTINCTROW
Max(comh_corder_version_head.covh_due_date) AS LastOfcovh_due_date,
Max(comh_corder_version_head.covh_order_number) AS MaxOfcovh_order_number, comh_corder_version_head.covh_vin_number,
Max(comh_corder_version_head.corder_version_head_obj) AS MaxOfcorder_version_head_obj
FROM comh_corder_version_head
GROUP BY comh_corder_version_head.covh_vin_number;
It obviously is not liking the max command.
John Green
SELECT DISTINCTROW
Max(comh_corder_version_head.covh_due_date) AS LastOfcovh_due_date,
Max(comh_corder_version_head.covh_order_number) AS MaxOfcovh_order_number, comh_corder_version_head.covh_vin_number,
Max(comh_corder_version_head.corder_version_head_obj) AS MaxOfcorder_version_head_obj
FROM comh_corder_version_head
GROUP BY comh_corder_version_head.covh_vin_number;
It obviously is not liking the max command.
John Green