mcrmg
asked on
Convert to text to display in excel
Hi,
When I display data in SQL, I have one decimal point, for example. 1.0 or 2.0
When I copy it and paste on to Excel, decimal point disappear. Here is my code to convert to text, but it is still not showing .0 in Excel.
When I display data in SQL, I have one decimal point, for example. 1.0 or 2.0
When I copy it and paste on to Excel, decimal point disappear. Here is my code to convert to text, but it is still not showing .0 in Excel.
Select top 1 CONVERT(VARCHAR(10), CONVERT(DECIMAL(2,1),[Version]) ) + ' '
from codex
where [Trans Id] = W.[Trans Id]
The cell in Excel isn't formatted to show decimal places. You need to format the cell or Excel will not show insignificant digits.
ASKER
So, even if I format it as varchar? thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I see. thank you