Hello All.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Have a connection string that I use to pull data into an excel table.<o></o>
<o></o>
The issue I have is that one column (hours)is exporting as general but need it to come down as decimal<o></o>
<o></o>
I have tried to cast and convert, as well as *1.0 but it will not work.<o></o>
<o></o>
The column (hours) properties are nvarchar 255,null<o></o>
And have both single char and decimals<o></o>
5<o></o>
4.75<o></o>
8.5<o></o>
<o></o>
SELECT Convert(decimal(18,2), hours)*1.0 as hours<o></o>
FROM [dbLookups].[dbo].[TTDATA]<o></o>
full join dblookups.dbo.tblcolhierarchy<o></o>
on empid = empid<o></o>
<o></o>
How do I format it in my query so it will automatically come down as decimal?<o></o>
<o></o>
Thanks<o></o>
<o></o>
Have a connection string that I use to pull data into an excel table.<o></o>
<o></o>
The issue I have is that one column (hours)is exporting as general but need it to come down as decimal<o></o>
<o></o>
I have tried to cast and convert, as well as *1.0 but it will not work.<o></o>
<o></o>
The column (hours) properties are nvarchar 255,null<o></o>
And have both single char and decimals<o></o>
5<o></o>
4.75<o></o>
8.5<o></o>
<o></o>
SELECT Convert(decimal(18,2), hours)*1.0 as hours<o></o>
FROM [dbLookups].[dbo].[TTDATA]<o></o>
full join dblookups.dbo.tblcolhierarchy<o></o>
on empid = empid<o></o>
<o></o>
How do I format it in my query so it will automatically come down as decimal?<o></o>
<o></o>
Thanks<o></o>