| Author |
Topic  |
|
|
albertkohl
Aged Yak Warrior
USA
723 Posts |
Posted - 12/06/2012 : 17:27:25
|
question of the day, how can i export my zipcode column in zip format? so not text, but not numeric either. so basically same is if i select a column in excel, format cells... and set it to Special > Zip Code
Any Ideas? |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47173 Posts |
Posted - 12/07/2012 : 08:24:11
|
howzz data coming from source? if you want to enforce a pattern use regular expression
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
albertkohl
Aged Yak Warrior
USA
723 Posts |
Posted - 12/07/2012 : 09:18:34
|
it's in a sql database, column is currently formatted as CHAR(5).
how can i export it to excel with a regular expression? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47173 Posts |
Posted - 12/07/2012 : 09:34:24
|
hmm...do you mean after export it needs to have predefined format? whats the format you're looking at? how are values in SQL table?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
albertkohl
Aged Yak Warrior
USA
723 Posts |
Posted - 12/07/2012 : 09:53:45
|
| yes. in SQL it's a zipcode fields. so states like NJ for example, could be 01234. most states are 12345 kinda format. when it dumps into excel. the NJ zipcode for example would be 1234 instead of 01234. which will mess up the import on the other side. i've found a vb script that'll fix it, but it's ugly, and seems kinda, well, half-assed... |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47173 Posts |
Posted - 12/07/2012 : 11:41:53
|
then is it matter of exporting it as text rather than number?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
albertkohl
Aged Yak Warrior
USA
723 Posts |
Posted - 12/07/2012 : 11:58:47
|
| yes, but the column in excel has to be formatted as general, with the zipcode mask. |
 |
|
| |
Topic  |
|