Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ZIPCODE DB ACCESS TO SQL

Reply
Thread Tools

ZIPCODE DB ACCESS TO SQL

 
 
DaveF
Guest
Posts: n/a
 
      09-29-2004
How to I get the db in sql to keep the leading 0's from the import?

--


David


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      09-29-2004
What data type do you have the SQL field set to? Try setting it to a char
field.


"DaveF" <> wrote in message
news:...
> How to I get the db in sql to keep the leading 0's from the import?
>
> --
>
>
> David
>
>



 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      09-29-2004
Make sure you're storing the zip code in a text field of one kind or another
(char or varchar for example) not a numeric field.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


"DaveF" <> wrote in message
news:...
> How to I get the db in sql to keep the leading 0's from the import?
>
> --
>
>
> David
>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      09-29-2004
This point can't be emphasized enough. A Zip Code is NOT a number. It is a
string containing a sequence of numeric characters. Some Zip Codes include
hyphens, as in:

12345-0123

Some Zip Codes Begin with '0'. If you treat them like numbers, you will
corrupt the data.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve C. Orr [MVP, MCSD]" <> wrote in message
news:...
> Make sure you're storing the zip code in a text field of one kind or

another
> (char or varchar for example) not a numeric field.
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
>
> "DaveF" <> wrote in message
> news:...
> > How to I get the db in sql to keep the leading 0's from the import?
> >
> > --
> >
> >
> > David
> >
> >

>
>



 
Reply With Quote
 
DaveF
Guest
Posts: n/a
 
      09-29-2004
They are in an access db as a string. I exported it to a excell file and
imported it to a nvarchar. It got rid of the zero's in the beginning

--


David Fetrow
Helixpoint LLC.
http://www.helixpoint.com

"Kevin Spencer" <> wrote in message
news:...
> This point can't be emphasized enough. A Zip Code is NOT a number. It is a
> string containing a sequence of numeric characters. Some Zip Codes include
> hyphens, as in:
>
> 12345-0123
>
> Some Zip Codes Begin with '0'. If you treat them like numbers, you will
> corrupt the data.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
>
> "Steve C. Orr [MVP, MCSD]" <> wrote in message
> news:...
> > Make sure you're storing the zip code in a text field of one kind or

> another
> > (char or varchar for example) not a numeric field.
> >
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> >
> >
> > "DaveF" <> wrote in message
> > news:...
> > > How to I get the db in sql to keep the leading 0's from the import?
> > >
> > > --
> > >
> > >
> > > David
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      09-29-2004
I suspect Excel clipped the zeros.
It's notorious for such things.
Try to make sure Excel sees that data column as a text column.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net



"DaveF" <> wrote in message
news:...
> They are in an access db as a string. I exported it to a excell file and
> imported it to a nvarchar. It got rid of the zero's in the beginning
>
> --
>
>
> David Fetrow
> Helixpoint LLC.
> http://www.helixpoint.com
>
> "Kevin Spencer" <> wrote in message
> news:...
>> This point can't be emphasized enough. A Zip Code is NOT a number. It is
>> a
>> string containing a sequence of numeric characters. Some Zip Codes
>> include
>> hyphens, as in:
>>
>> 12345-0123
>>
>> Some Zip Codes Begin with '0'. If you treat them like numbers, you will
>> corrupt the data.
>>
>> --
>> HTH,
>> Kevin Spencer
>> .Net Developer
>> Microsoft MVP
>> I get paid good money to
>> solve puzzles for a living
>>
>> "Steve C. Orr [MVP, MCSD]" <> wrote in message
>> news:...
>> > Make sure you're storing the zip code in a text field of one kind or

>> another
>> > (char or varchar for example) not a numeric field.
>> >
>> > --
>> > I hope this helps,
>> > Steve C. Orr, MCSD, MVP
>> > http://Steve.Orr.net
>> >
>> >
>> > "DaveF" <> wrote in message
>> > news:...
>> > > How to I get the db in sql to keep the leading 0's from the import?
>> > >
>> > > --
>> > >
>> > >
>> > > David
>> > >
>> > >
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      09-29-2004
The zeros came off when you brought the data into Excel, since Excel see's
numbers and automatically formats the cells as numeric. Change the format
of the cells to text.


"DaveF" <> wrote in message
news:...
> They are in an access db as a string. I exported it to a excell file and
> imported it to a nvarchar. It got rid of the zero's in the beginning
>
> --
>
>
> David Fetrow
> Helixpoint LLC.
> http://www.helixpoint.com
>
> "Kevin Spencer" <> wrote in message
> news:...
>> This point can't be emphasized enough. A Zip Code is NOT a number. It is
>> a
>> string containing a sequence of numeric characters. Some Zip Codes
>> include
>> hyphens, as in:
>>
>> 12345-0123
>>
>> Some Zip Codes Begin with '0'. If you treat them like numbers, you will
>> corrupt the data.
>>
>> --
>> HTH,
>> Kevin Spencer
>> .Net Developer
>> Microsoft MVP
>> I get paid good money to
>> solve puzzles for a living
>>
>> "Steve C. Orr [MVP, MCSD]" <> wrote in message
>> news:...
>> > Make sure you're storing the zip code in a text field of one kind or

>> another
>> > (char or varchar for example) not a numeric field.
>> >
>> > --
>> > I hope this helps,
>> > Steve C. Orr, MCSD, MVP
>> > http://Steve.Orr.net
>> >
>> >
>> > "DaveF" <> wrote in message
>> > news:...
>> > > How to I get the db in sql to keep the leading 0's from the import?
>> > >
>> > > --
>> > >
>> > >
>> > > David
>> > >
>> > >
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to Format a zipcode into xxxxx-xxxx. Jeff Thur ASP .Net Datagrid Control 1 02-18-2005 04:14 AM
How can I display a 9 digit zipcode in a Datagrid with a hypen Jeff Thur ASP .Net Web Controls 1 02-17-2005 01:02 PM
[YO] Free Swingers Search, See Pics, Read Stories, Search Via Zipcode! Swin4Real Mon Computer Support 0 11-23-2004 03:20 AM
[OT] Free Swingers Search, See Pics, Read Stories, Search Via Zipcode! Joe Deluga Computer Support 0 11-17-2004 05:19 AM
Canada ZipCode Finder Irishmaninusa ASP General 1 08-18-2003 04:27 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57