A0060145
SQL query error: SELECT p.ProductID, ProdnameE, ProdNameT , SizeW, SizeD,SizeH,PriceUnit,ColorNameE,MakerNameE,RankName,L,M,L_T,M_T,case when ifnull(PSTSH1.Shop1Qty,0) < 0 then 0 else ifnull(PSTSH1.Shop1Qty,0) end Shop1Qty, case when ifnull(PSTSH1.Shop1Qty,0) < 0 then PSTSH1.Shop2Qty+PSTSH1.Shop1Qty else ifnull(PSTSH1.Shop2Qty,0) end Shop2Qty,ProdCatGrpNo,ProdCatMdlNo,PriceNet,MaterialNameE,p.CommentTh,p.Comment,DetailLink, case when ifnull(PSTSH1.Shop3Qty,0) < 0 then 0 else ifnull(PSTSH1.Shop3Qty,0) end Shop3Qty FROM (select * from mstproduct_n where DelFlag=0 ) as p Left Join (select productid,sum(Shop1Qty) Shop1Qty,sum(Shop2Qty) Shop2Qty,sum(Shop3Qty) Shop3Qty from ( select ProductID, case when ShopID=1 And LocationID <> 3 then AvailableQty else 0 end Shop1Qty, case when ShopID=2 then AvailableQty else 0 end Shop2Qty, case when ShopID=1 And LocationID = 3 then AvailableQty else 0 end Shop3Qty from PrgStock) as b group by productid ) PSTSH1 on p.ProductID=PSTSH1.ProductID WHERE ifnull(PSTSH1.Shop2Qty,0)+ifnull(PSTSH1.Shop1Qty,0)+ifnull(PSTSH1.Shop3Qty,0) > 0 AND p.ProductID ='A0060145'
02-964-5900-1 Everyday 9:00-18:00(public holiday)
A0060145