quan_pur N 8-3 prod_upc C-12 trans_dt DateTimeand a table pse_drug with the following field
upc C-12When I run the following code to extract all the records from pse_trans table
SELECT SUM(quan_pur) AS Sum24TransUPC, prod_upc FROM pse_trans ; GROUP BY prod_upc ; HAVING prod_upc = pse_drug.upc ; AND trans_dt >= (DATETIME() - 86400) INTO CURSOR TwentyFourHoursQuantUPCI get an error - 'SQL: Having Clause is Invalid'