SharkBait Posted October 3, 2006 Share Posted October 3, 2006 [code]SELECT T0.DocNum, T0.TrnspCode, T2.ItemCode, T2.U_MODELNUM, T2.Quantity, T2.Price, T2.Weight1, T2.Length1, T2.Width1, T2.Height1 FROM OQUT T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN QUT1 T2 ON T0.DocEntry = T2.DocEntry INNER JOIN CRD1 T3 ON T1.CardCode = T3.CardCode WHERE T0.DocNum = '1667' AND T3.AdresType = 'S'[/code]How do modify the above query to GROUP BY T2.U_MODELNUM ? I tack on GROUP BY T2.U_MODELNUM at the end of the query and it doesn't allow for it. Something about agregated functions? Quote Link to comment https://forums.phpfreaks.com/topic/22879-group-by/ Share on other sites More sharing options...
thekl0wn Posted October 4, 2006 Share Posted October 4, 2006 Any column included in the SELECT, but not in a GROUP BY or an aggregate function ( SUM, etc ), will throw an error. Quote Link to comment https://forums.phpfreaks.com/topic/22879-group-by/#findComment-103727 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.