// Converted the Char value '' to the Int32 value 7. // Converted the Char value '?' to the Int32 value 1023. // Converted the Char value '?' to the Int32 value 32767. // Converted the Char value '?' to the Int32 value 65534.
https://msdn.microsoft.com/en-us/library/ww9t2871(v=vs.110).aspx
However, some numbers in the Unicode standard are represented by two Char objects that form a surrogate pair. For example, the Aegean numbering system consists of code points U+10107 through U+10133. The following example uses the ConvertFromUtf32 method to instantiate a string that represents AEGEAN NUMBER ONE.
https://msdn.microsoft.com/en-us/library/e7k33ktz(v=vs.110).aspx
TO_CHAR (number) TO_CHAR (number) converts n to a value of VARCHAR2 datatype, using the optional number format fmt. The value n can be of type NUMBER, BINARY_FLOAT, or BINARY_DOUBLE. If you omit fmt, then n is converted to a VARCHAR2 value exactly long enough to hold its significant digits.
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions181.htm
Storage Options. Character Data Types. Most databases I have seen (and most I have designed) have stored phone numbers in a character field. Typically, this could be as big as a varchar(22) field which can store the formatted North American phone number with an extension, in the form (999) 555-1212 ext1234.
https://www.codeproject.com/articles/20434/telephone-numbers-in-sql-server-part-the-da
TO_NUMBER. TO_NUMBER converts expr to a value of NUMBER datatype. The expr can be a BINARY_FLOAT or BINARY_DOUBLE value or a value of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype containing a number in the format specified by the optional format model fmt. This function does not support CLOB data directly.
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions191.htm
Valid numbers are members of the UnicodeCategory.DecimalDigitNumber, UnicodeCategory.LetterNumber, or UnicodeCategory.OtherNumber category. The method assumes that c corresponds to a single linguistic character and checks whether that character represents a number. However, some numbers in the Unicode standard are represented by two Char objects that form a surrogate pair. For example, the Aegean numbering system consists of code points U+10107 through U+10133. The following example uses the ConvertFromUtf32 method to instantiate a string that represents AEGEAN NUMBER ONE.
https://msdn.microsoft.com/en-us/library/yk2b3t2y(v=vs.110).aspx
Datatype for phone number: VARCHAR, INT or BIGINT? So this will be the dummy question of the year but I need to ask since is not the first time I pass through this. Take a look at the column from_number which is a VARCHAR(45) right now but it will hold a phone number. Since I don't know how many numbers a phone could have all over the world then I am trying to cover almost all of them.
https://dba.stackexchange.com/questions/124546/datatype-for-phone-number-varchar-int-or-bigint
The method returns a 32-bit signed integer that represents the UTF-16 encoded code unit of the value argument. If value is not a low surrogate or a high surrogate, this return value also represents the Unicode code point of value. The following example converts each element in an array of Char values to an integer. C#.
https://msdn.microsoft.com/en-us/library/ww9t2871(v=vs.110).aspx
How would you handle a phone number with an extension, such as +1-000-000-0000 ext 1234 ? Note, the + indicates international dialing rules should be applied; so from North America, the system automatically knows 011 in front of international calls, etc.
https://dba.stackexchange.com/questions/124546/datatype-for-phone-number-varchar-int-or-bigint
The numeric value of c if that character represents a number; otherwise, -1.0. The c parameter must be the Char representation of a numeric value. For example, if c is 5, the return value is 5. However, if c is z, the return value is -1.0.
https://msdn.microsoft.com/en-us/library/e7k33ktz(v=vs.110).aspx
phone number a char or int
The phone number is a VARCHAR not an Integer.