Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jcb267
Constraint Violating Yak Guru
291 Posts |
Posted - 2011-06-28 : 12:59:03
|
| Hi - I have a field called GroupSize that has values such as 1-5, 6-10, etc. When I call this field in a query, sql displays is properly but when I copy it to excel it is formatted as a date. For example 1-5 comes over as 5-Jan. Do i need to convert it in excel?? Can anyone help??Thanks very much,JB |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-06-28 : 13:03:35
|
| You'll need to format the cells in Excel at Text, then paste. There's nothing to do on the SQL Server side. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jcb267
Constraint Violating Yak Guru
291 Posts |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-06-28 : 13:27:45
|
| There's no "correct" way, it's Excel's fault because it tries to interpret the type of data. The only way to prevent that is to format the cells as Text (instead of General, Number, etc.) You have to do that before you paste data from another source. |
 |
|
|
|
|
|