Connecting Tech Pros Worldwide Forums | Help | Site Map

Loss of Data Converting Text to Number

Megan
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi everyone-

I'm trying to convert social security numbers from a text data type to
a number data type, but I lose data on some of the social security
numbers, especially SS#s with 0's in them. For example: 123-45-6789
might become 45-6789. This happens in about 20% of the SS#s.

I tried opening the table then switching text to number. I also tried
creating a new table, changing the field from text to number, then
running an append query, but I still lose data and get incomplete
SS#s.

Can anybody give me any suggestions. I'm not much of a VBA coder yet.

Thanks a bunch!

Megan

Jim Allensworth
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Loss of Data Converting Text to Number


On 25 Jul 2004 20:27:31 -0700, meganrobertson22@hotmail.com (Megan)
wrote:
[color=blue]
>Hi everyone-
>
>I'm trying to convert social security numbers from a text data type to
>a number data type, but I lose data on some of the social security
>numbers, especially SS#s with 0's in them. For example: 123-45-6789
>might become 45-6789. This happens in about 20% of the SS#s.
>
>I tried opening the table then switching text to number. I also tried
>creating a new table, changing the field from text to number, then
>running an append query, but I still lose data and get incomplete
>SS#s.
>
>Can anybody give me any suggestions. I'm not much of a VBA coder yet.
>[/color]

Question. Why would you want to use a numeric data type for SS#s?
The only reason for a number is to perform an arithmetic operation on
it. Which you should never do on an ID. Answer yourself that question
and then proceed.

- Jim
Terry Kreft
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Loss of Data Converting Text to Number



But 123-45-6789 is not a number it's a string and so should be stored in a
text field.


--
Terry Kreft
MVP Microsoft Access


"Megan" <meganrobertson22@hotmail.com> wrote in message
news:5c14c12b.0407251927.6f8f0d2d@posting.google.c om...[color=blue]
> Hi everyone-
>
> I'm trying to convert social security numbers from a text data type to
> a number data type, but I lose data on some of the social security
> numbers, especially SS#s with 0's in them. For example: 123-45-6789
> might become 45-6789. This happens in about 20% of the SS#s.
>
> I tried opening the table then switching text to number. I also tried
> creating a new table, changing the field from text to number, then
> running an append query, but I still lose data and get incomplete
> SS#s.
>
> Can anybody give me any suggestions. I'm not much of a VBA coder yet.
>
> Thanks a bunch!
>
> Megan[/color]


Closed Thread