I am unable to get a SUM() to work correctly and it appears that the table data has "$" inserted into the database, would this cause a SUM() not to work correctly?
Is it bad practice to use "$" within your numerical rows?
Thank you.
NEX2NUN wrote:Is it bad practice to use "$" within your numerical rows?
Yes. If you want to do arithmetic with the data, store it as a number and use an appropriate number column type.
laserlight;10901924 wrote:Yes. If you want to do arithmetic with the data, store it as a number and use an appropriate number column type.
Is there a way to now strip the "$" from the data? Or a way to do a replace UPDATE somehow?
Update foo Set money = replace(money, '$', '')
better double check the syntax, im pulling it out of my brain
dagon;10902012 wrote:Update foo Set money = replace(money, '$', '') better double check the syntax, im pulling it out of my brain
That worked!! Thank you!!!!