RE: A bit of SQL help for a MySQL novice.

2005-11-17 Thread Mikhail Berman
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

Re: A bit of SQL help for a MySQL novice.

2005-11-17 Thread Peter Brawley
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

Re: A bit of SQL help for a MySQL novice.

2005-11-17 Thread Rhino
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.

Re: A bit of SQL help for a MySQL novice.

2005-11-17 Thread Rick Dwyer
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 for this any help in pointing me to a more suited list would be appreciated. I have a MySQL 4.1.x dat

Re: A bit of SQL help for a MySQL novice.

2005-11-17 Thread Rhino
- 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 i

Re: A bit of SQL help for a MySQL novice.

2005-11-17 Thread SGreen
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

A bit of SQL help for a MySQL novice.

2005-11-17 Thread Rick Dwyer
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 MySQL 4.1.x database containing records with phone numbers. Most of the phon