Link to home
Start Free TrialLog in
Avatar of mcrmg
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.
	Select top 1 CONVERT(VARCHAR(10), CONVERT(DECIMAL(2,1),[Version]) ) + ' '
	from codex
	where [Trans Id] = W.[Trans Id]

Open in new window

Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

The cell in Excel isn't formatted to show decimal places.  You need to format the cell or Excel will not show insignificant digits.
Avatar of mcrmg

ASKER

So, even if I format it as varchar? thanks
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mcrmg

ASKER

I see. thank you