From: Mike O'Krongli Date: December 29 2012 12:44pm Subject: Re: Query Resulting error List-Archive: http://lists.mysql.com/mysql/228854 Message-Id: <89BD8E37-DA43-4999-85CC-EAB4A4C77567@acorg.com> MIME-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi=20 To me it looks like quantity is being multiplied by the price and then = added to total. Try something like this SELECT total,(quantity*price) as QP from sales where total !=3DQP AND = salesid=3D122 On 2012-12-29, at 7:25 AM, Trimurthy wrote: > hi, > i am working with mysql 5.1.36 and i wrote the following query. >=20 > select total,quantity*price from sales where total !=3D = quantity*price and=20 > salesid=3D122; >=20 > OUT PUT: >=20 > total quatity*price > 330.46 330.46=20 >=20 > here quantity is 15.5 and price is 21.32 >=20 > both the values and data types are double(total,quantity and price). = can=20 > anyone tell me why this is happening. =20 >=20 > Normal 0 false false false EN-US = =20 > X-NONE AR-SA = =20 >=20 >=20 >=20 >=20 >=20 >=20 > Thanks & Kind Regards, > TRIMURTHY >=20