Re: SELECT the first letter MATCH in mySQL

2002-04-19 Thread Paul DuBois
At 9:00 +0200 4/19/02, Jan Peuker wrote: >There is a method using trim() but I think it's better to use RLIKE "^A.*" Regular expression patterns (unlike SQL patterns) don't need to match the entire string, so RLIKE '^A' is sufficient and more efficient because it doesn't spend time trying to matc

RE: SELECT the first letter MATCH in mySQL

2002-04-19 Thread Mikael Hultén
: SELECT the first letter MATCH in mySQL Importance: High This works on MsSQL: "SELECT lyric_title FROM lyrics WHERE LEFT(lyric_title,1)='A'" > I want to select all the records, which have the first letter matched > the letter 'A'. > > $SQL_get_lyri

Re: SELECT the first letter MATCH in mySQL

2002-04-18 Thread Charles Brisson
This works on MsSQL: "SELECT lyric_title FROM lyrics WHERE LEFT(lyric_title,1)='A'" > I want to select all the records, which have the first letter matched > the letter 'A'. > > $SQL_get_lyrics = "SELECT lyric_title FROM lyrics WHERE lyric_title > LIKE \'A%\'"; > > Some how this statement give

Re: SELECT the first letter MATCH in mySQL

2002-04-18 Thread Jan Peuker
There is a method using trim() but I think it's better to use RLIKE "^A.*" regards, Jan Peuker - Original Message - From: "Son Nguyen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 19, 2002 8:42 AM Subject: SELECT the first letter MATCH in mySQL > I want to select al