H(str)
Returns the length of the string str, measured in bytes. A multi-byte
character counts as multiple bytes. This means that for a string
containing five two-byte characters, LENGTH() returns 10, whereas
CHAR_LENGTH() returns 5.
mysql> SELECT LENGTH('text');
-> 4
Mikhail Berm
Rick
>I need to read the first 4 positions in the phone number to determine
it's location.
>My statement looks like this:
>'Select mid(phone, 1,4) as phoneareacode from phonetable'
>This works but if the number is entered as 1(203)-555-1212 the above
would return "1(20" which is not >wha
way to get that
area code.
Rhino
- Original Message -
From: "Rick Dwyer" <[EMAIL PROTECTED]>
To:
Sent: Thursday, November 17, 2005 11:53 AM
Subject: Re: A bit of SQL help for a MySQL novice.
Unfortunately, the phone numbers come from text logs that get imported
into mysql.
Unfortunately, the phone numbers come from text logs that get
imported into mysql. Because the phone number is often displayed on
a document for the customer, they will dictate how they want it to
appear (i.e. with ( ) etc.). The phone logs simply record those
values as they are so data
- Original Message -
From: "Rick Dwyer" <[EMAIL PROTECTED]>
To:
Sent: Thursday, November 17, 2005 10:28 AM
Subject: A bit of SQL help for a MySQL novice.
Hello All.
I am hoping for a bit of help with some code that has really given me
some trouble. If this is not he correct forum
Rick Dwyer <[EMAIL PROTECTED]> wrote on 11/17/2005 10:28:51 AM:
> Hello All.
>
> I am hoping for a bit of help with some code that has really given me
> some trouble. If this is not he correct forum for this any help in
> pointing me to a more suited list would be appreciated.
>
> I have a My