extract data to csv problem..

Last Post 23 Feb 2005 06:50 PM by nosepicker. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
samkry
New Member
New Member

--
23 Feb 2005 06:40 PM
Hi I need ur help here..
Now I'm extract the data out to a csv file, but the problem is when I open it in excel all values that comes with 0 infront has been truncated by excel and for the time&date it display as weird values..
so how do I avoid the data from being truncated by excel..

below is the example..

in database
090640
display as below number in excel
90640

in database
2004-07-13 11:16:37.320
display as below number in excel
16:37.3


nosepicker
New Member
New Member

--
23 Feb 2005 06:50 PM
Those columns need to be defined as text columns. When you open the file, there is a step during the wizard that allows you to change the data format from General to Text.
samkry
New Member
New Member

--
23 Feb 2005 07:14 PM
Yep..
That is only usefull when we extract the file to text then put them into an excel..
actually I'm using import export wizard to extract the data out then save them as CVS, by doing this data file will automatically save as excel file, that is why I need to know whether u can use sql to define a value as text rather then number
nosepicker
New Member
New Member

--
28 Feb 2005 04:39 PM
I think if you export the file to an Excel format instead of csv format, you will have better luck. I tried it and the leading zero was preserved, and the date was the same, except initially only the date and not the time was shown. But if you change the excel column format to display the time as well, it will be shown properly.
You are not authorized to post a reply.

Acceptable Use Policy