A more general approach will also work. The Replace function can be used to replace any substring in a string with any other substring. In our case, you would replace the '$' with the null string:
Replace(YourColumn,'$','','all') would do it in your CFML template output although if you can be sure that all your columns have a precedding '$' you could try doing it right in the SQL.
SELECT
Right(YourColumn,(len(YourColumn) - 1)) AS NoDollars
Scalar functions can be much faster than thier CFML counterparts.
Maybe I'm overlooking something, here, but is there any particular reason you have to store the number with a $? Why not just store it in the database as a decimal number and use the DollarFormat function when you want to display it? Calista :-X
Jedi Knight,
Champion of the Force
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.