December 12, 2014 at 3:01 am
Hi,
I had the following value 01011976 in my sql column.
But when I copy it in excel it copies as 1011976.
starting zero is discarded.
But I want as it as 01011976.
Please suggest me how to do this.
Thanks & Regards
Avdhut Pol
December 12, 2014 at 3:07 am
Dear Avdhut,
Although this is not a SQL Related question.
but here you go.
In the excel sheet right click on the cell on go to "Format Cells" and select "Text" and click on ok.
After that paster your value in that cell.
Hope it helps.
Regards
Shafat Husain
Regards,
Shafat Husain
🙂
And Your Lord Never Forgets...!! (64:19 -- Quran)
December 12, 2014 at 3:12 am
If you want to export a whole result set to Excel, the easiest way I know of is a small ad free Management Studio add-in called ssmsboost. It can export a result set to excel using the xml format.
Every column keeps the original data type, so you don't have to deal with different date/number formats and/or conversion to and from numbers and strings.
-- Gianluca Sartori
December 12, 2014 at 3:48 am
If it's a one-off copy-and-paste into Excel, you can also type a "'" (single quote) into the cell and append the number on to that. That will have the effect of formatting the cell as text, but won't display the "'".
John
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply