Jump to content

Numbers problems


jteixeira

Recommended Posts

HiI presume that you are using the comma as a decimal separator and that is what your version of sql server uses.A numeric field when selected doesn't normally return trailing zeros, so this field must be varchar.The following works for me, but I'm not using a comma in the numberdeclare @xa varchar(30);set @xa = '151.1500';print (@xa); -- prints 151.1500 print cast(@xa as float); -- prints 151.15print cast(cast(@xa as float) as varchar); -- prints 151.15Is that any use?nibe

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...