April 9th, 2010, 01:14 PM
I'm using SQL server 2005 to send an email via a stored procedure. The problem I'm having is that when the data returned from the query gets put into the html table, I get some decimal rounding. The date returned is type money, but in order to build the HTML I need to convert it to a varchar. Rather then .1234, what I'm getting in the table is .12. I've printed out the data to the screen all throughout the SP, and it all seems correct until I get the email.
I convert using cast: CAST(@markup as varchar(10)) when I'm building my HTML string for the row. I thought maybe the cast did it, but I tested CAST(.365 as varchar(10)) and got .365. I made sure the variable @markup had .365 in it and it does.
Anyone have any thoughts?
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!