Jump to content

gmundt

New Members
  • Posts

    1
  • Joined

  • Last visited

gmundt's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. gmundt

    Query Hangs

    I am wondering why the following query just spins in MySQL Workbench. SELECT ORD_Item, ORD_Desc, ORD_Item_Class, SUM(ORD_Qty), SUM(ROUND(ORD_Qty*ORD_Price,2)), `pos_item_descriptions`.ITEM_Desc FROM pos_ord_headers STRAIGHT_JOIN pos_ord_lines ON `pos_ord_headers`.`ORD_ID`=`pos_ord_lines`.`ORD_ID` LEFT JOIN pos_item_descriptions ON `pos_ord_lines`.`ORD_Item`=`pos_item_descriptions`.`ITEM_Number` WHERE `pos_ord_headers`.`ORD_Store`="0022" AND pos_ord_headers.ORD_Date BETWEEN"2015-06-01" AND "2015-06-30" AND pos_ord_lines.ORD_Item_Class IN ("Baskets") GROUP BY ORD_Item This query works: SELECT ORD_Item, ORD_Desc, ORD_Item_Class, SUM(ORD_Qty), SUM(ROUND(ORD_Qty*ORD_Price,2)), `pos_item_descriptions`.ITEM_Desc FROM pos_ord_headers STRAIGHT_JOIN pos_ord_lines ON `pos_ord_headers`.`ORD_ID`=`pos_ord_lines`.`ORD_ID` LEFT JOIN pos_item_descriptions ON `pos_ord_lines`.`ORD_Item`=`pos_item_descriptions`.`ITEM_Number` WHERE `pos_ord_headers`.`ORD_Store`="0022" AND pos_ord_headers.ORD_Date BETWEEN"2015-06-01" AND "2015-06-30" AND pos_ord_lines.ORD_Item_Class IN ("Ice Cream") GROUP BY ORD_Item And the only difference is the different class selection.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.