LittleNick
Technical User
Hi All,
Let say I have a SQL table named tblSPcodes in which all fraction numbers are stored as text like this:
SCode
255.20
332.01
227.1
732.10
When I export this text column to Excel it will make it look like this
SCode
255.2
332.01
227.1
732.1
But if I format the cell 2 decimal places in Excel it will look like this
SCode
255.20
332.01
227.10 (extra 0 that can not be in there)
732.10
It will add the 0 to the end of 227.1 as 227.10 which is not what it's in SQL table. So What I plan to do is to insert (or update the column) the apostrophe (') in front of the codes so that when it export to excel the (') will tell it to keep it as text format and therefore exactly the way it looks in Excel as in tblSPCode. But the problem is I am having hard time to insert the apostrophe (')
update tblSPCode
set Scode = ''' + SCode
will not work because of this (''').
Any suggestion is very appreciated
Let say I have a SQL table named tblSPcodes in which all fraction numbers are stored as text like this:
SCode
255.20
332.01
227.1
732.10
When I export this text column to Excel it will make it look like this
SCode
255.2
332.01
227.1
732.1
But if I format the cell 2 decimal places in Excel it will look like this
SCode
255.20
332.01
227.10 (extra 0 that can not be in there)
732.10
It will add the 0 to the end of 227.1 as 227.10 which is not what it's in SQL table. So What I plan to do is to insert (or update the column) the apostrophe (') in front of the codes so that when it export to excel the (') will tell it to keep it as text format and therefore exactly the way it looks in Excel as in tblSPCode. But the problem is I am having hard time to insert the apostrophe (')
update tblSPCode
set Scode = ''' + SCode
will not work because of this (''').
Any suggestion is very appreciated