Its gives an error. ---------------------------------------------------------------------------- -------------------------------------------- SELECT urun.`StokKodu`, urun.`Isim`, (SUM((depo.EvrakYonu)*depo.Miktar)-SUM((1-depo.EvrakYonu)*depo.Miktar)) AS `Mevcut Miktar`
FROM rootdata.urun AS urun, seconddata.depohareket AS depo WHERE urun.`ID` = depo.`UrunID` AND depo.`Iptal` = 0 AND urun.`HizmetUrunu` = 0 AND (SUM((depo.EvrakYonu)*depo.Miktar)-SUM((1-depo.EvrakYonu)*depo.Miktar))<>0 GROUP BY urun.`ID` ---------------------------------------------------------------------------- ------------------------------------------- Th error says : Invalid use of group function. Can you help me?? -----Original Message----- From: Uttam [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 4:06 PM To: 'Aziz DURMAZ'; [EMAIL PROTECTED] Subject: RE: A query problem... >But i dont want to get a row which `Mevcut Miktar`=0 >How i can modify my query. --------------------------------------------------------- SELECT urun.`StokKodu`, urun.`Isim`, (SUM((depo.EvrakYonu)*depo.Miktar)-SUM((1-depo.EvrakYonu)*depo.Miktar)) AS `Mevcut Miktar` FROM rootdata.urun AS urun, seconddata.depohareket AS depo WHERE urun.`ID` = depo.`UrunID` AND depo.`Iptal` = 0 AND urun.`HizmetUrunu` = 0 AND (SUM((depo.EvrakYonu)*depo.Miktar)-SUM((1-depo.EvrakYonu)*depo.Miktar))<>0 GROUP BY urun.`ID` regds, -----Original Message----- From: Aziz DURMAZ [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 14:06 To: [EMAIL PROTECTED] Subject: A query problem... this is my query: SELECT urun.`StokKodu`, urun.`Isim`, (SUM((depo.EvrakYonu)*depo.Miktar)-SUM((1-depo.EvrakYonu)*depo.Miktar)) AS `Mevcut Miktar` FROM rootdata.urun AS urun, seconddata.depohareket AS depo WHERE urun.`ID` = depo.`UrunID` AND depo.`Iptal` = 0 AND urun.`HizmetUrunu` = 0 GROUP BY urun.`ID` But i dont want to get a row which `Mevcut Miktar`=0 How i can modify my query. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php