Hello.
Do you want something similare to this: SELECT SUM(IF(moving like 'Move-',-moved_quantities,moved_quantites)) FROM DB; Have a look here: http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html Mester József wrote: > Hy > > I want to sum quantites but there is some data that value is negative but > users didn't write the - sign before. I can decide which datas are negative. > > I would like something like that > > select sum(moved_quantities) from db > if moving like 'Move-' then sum seem the move is negative > else move value is positive > > Is it possible? > > Joe > > > > > --------------------------------- > Yahoo! Cars NEW - sell your car and browse thousands of new and used cars > online search now > --------------------------------- > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]