G'day Daren

> $query = "SELECT * FROM tbl_name WHERE LEFT(last_name, 1) == '$letter')";
> NOTE: LEFT() is a "special" function, I'd consider it a derivative of
> SUBSTRING()
€€€€
Does MySQL have a function that can selectively return words from a column?

What I'm looking for is the equivalent of rightwords(text,1) which would
return the rightmost word from text. I'm trying to extract the lastname only
from a column which holds the full name (the data is coming from another
database where the first and last names are combined).

Alternatively, is there a way to parse the names during a LOAD?

cheers

Kim
Sql, query


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to