#1111 - Invalid use of group function error in stored procedure mysql -


<पूर्व> DELIMITER // CREATE PROCEDURE GetAllData () BEGIN execcrice DOUBLE DECLAR; SET निष्पादित = योग (अंतिम क्वालिटी * LastPx) / राशि (अंतिम क्वालिटी); AvgExedPrc, sum ((LastQty * LimitPrice)) के रूप में अंपायर चुनें / avgOrdPrc के रूप में (LastQty) योग,

चर execprice का उपयोग करने में असमर्थ कोई भी कृपया मदद कर सकता है।

sum () का उपयोग केवल एक क्वेरी में किया जाता है , जैसा कि यह 1 या अधिक पंक्तियां बताता है

यहां आपके पास समेटे जाने के लिए कुछ भी नहीं है: <प्री> SET execPrice = sum (LastQty * LastPx) / राशि (LastQty);

इसे बदलें

  SET execPrice = LastQty * LastPx / LastQty;    

Comments

Popular posts from this blog

Delphi: missing interface declarations for UI Automation methods -

php - how to change mysql_result($res, 0, "url"); to mysqli -

android - How to attach an image from an app to gmail -