[thelist] mysql regular expression query

Rob Smith rob.smith at THERMON.com
Mon Nov 11 11:55:01 CST 2002


Hi Kevin,

I'm sure there is a way to do this; I've heard SUBSTRING() SQL function may
be of some use
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
setu-sus_6btz.asp (watch the word wrap).

I've also heard that their really isn't an official "split" function
available but SQL does come packed with SQL string functions. The way I'd do
it with my little diverse knowledge of SQL, is I'd grab the cell contents,
and if the naming convention was the same (i.e. First Middle. Last), split
the recordset value up by the space delimeter, and finally rearrange the
results for the user.

Try Microsoft's solution though,

Rob.Smith



-----Original Message-----
From: Kevin [mailto:lists at irubin.com]
Sent: Monday, November 11, 2002 11:30 AM
To: Thelist
Subject: [thelist] mysql regular expression query


Hello,

I have a column in a mysql table with a name of a person, say "Franklin D.
Roosvelt". Can I
query the table so that the name will be retrieved in the following format:

Roosvelt, Franklin D.

Any help will be appreciated.

--Kevin


--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list