Oops, I meant to send this to the list.
----- Original Message -----
From: "Rhino" <rhino1@stripped>
To: "Mester József" <mesterjoco@stripped>
Sent: Friday, January 06, 2006 8:44 AM
Subject: Re: SQL Question
> ----- Original Message -----
> From: "Mester József" <mesterjoco@stripped>
> To: "Mysql list" <mysql@stripped>
> Sent: Friday, January 06, 2006 3:42 AM
> Subject: SQL Question
>> 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
>> 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?
> If you know which values are supposed to be negative, wouldn't it be
> easier to do updates to your data to change all of those values to
> negatives? That should only need to be done once. Then use the normal SQL
> sum() function to add all of the values together.
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.14/222 - Release Date: 05/01/2006
|• Fw: SQL Question||Rhino||6 Jan|