#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

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

c# - How to clone a HttpRequestMessage when the original request has Content? -

split - php explode string with Uppercase if lowercase letter exists before it without space -