mysql varchar number to decimal

Elucidate-Technologies
Elucidate-Technologies used Ask the Experts™
on
Hi, I have a mysql varchar field that contains formatted numbers.

I need a script to change that formatted varchar to decimal.

Example of what I have in `monthlysalary` varchar field:

1,500.00
3,000.00
2,600.00

Example of what I need as decimal:

1500.00
3000.00
2600.00

I need to be able to multiply the amount in the field by 0.15.

I have tried using cast(`monthlysalary` as decimal(10,2)) but it returns the following:

1,500.00 = 1.00
3,000.00 = 3.00
2,600.00 = 2.00


Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Billing Engineer
Most Valuable Expert 2014
Top Expert 2009
Commented:
cast( replace( `monthlysalary` , ',' , '' ) as decimal(10,2))

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial