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.

 All Forums
 Development Tools
 ASP.NET
 phone number handling

Author  Topic 

bubberz
Constraint Violating Yak Guru

289 Posts

Posted - 2007-08-02 : 12:54:49
Hello!

I'm wondering if anyone has any input on how to handle telephone number entry!

Here's what I have so far:

1. The numbers will be in US format (i.e. 3 digit area code, 3 digits, 4 digits)

2. I'll have three text boxes to enter the characters in above line item separately

3. I was thinking the datatype should be smallint, since tiny int might be too small, and int is not needed to that extent for each of the three values

4. The whole 10 digit value for the phone number will be stored in one column, and there will be a separate column for the extension, which I'm thinking that could be a char(10) or should it just be an int, and all characters will be numbers.

I'm thinking the phone number should be of a datatype of numbers only....but I'm looking for any comments.

Thanks!

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-08-02 : 13:53:01
we have the same system except we use varchar datatype and not int.
that's because some can start with a zero which int doesn't handle.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -