KirbyWallace
Programmer
This isn't critical, I'm just wondering if anyone can explain this.
I have an ASP (classic) page that is displaying info from a SQL Server 2008 table. The table column in question is a varchar(16) and contains data that is a text representation of a dollar amount - including the dollar sign. (eg, "$7,123.09"). It is definately text. I can open the table directly and see the numbers just like I just showed you. I can delete the dollar sign, the comma and the decimal, and it will save it just fine with my edits intact (ie, no dollar sign, comma or period).
Here's the curious bit.
When I display this data in an asp page, it strips out the dollar sign and comma (decimal point remains). $7,123.09" displays as "7123.09".
The data is not formatted when displayed. (ie, <TD><%=rs("order_amount")%></TD> ). It is not formatted when selected (ie, it's a "SELECT * FROM tbl_name).
Why does it change format when it displays a varchar representation of a dollar amount? And where does this "silent" conversion take place?
ASP/SQL sleuth's have at it....
Kirby
I have an ASP (classic) page that is displaying info from a SQL Server 2008 table. The table column in question is a varchar(16) and contains data that is a text representation of a dollar amount - including the dollar sign. (eg, "$7,123.09"). It is definately text. I can open the table directly and see the numbers just like I just showed you. I can delete the dollar sign, the comma and the decimal, and it will save it just fine with my edits intact (ie, no dollar sign, comma or period).
Here's the curious bit.
When I display this data in an asp page, it strips out the dollar sign and comma (decimal point remains). $7,123.09" displays as "7123.09".
The data is not formatted when displayed. (ie, <TD><%=rs("order_amount")%></TD> ). It is not formatted when selected (ie, it's a "SELECT * FROM tbl_name).
Why does it change format when it displays a varchar representation of a dollar amount? And where does this "silent" conversion take place?
ASP/SQL sleuth's have at it....
Kirby