Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7632D9FB595 for ; Mon, 25 Jun 2007 14:55:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76185-03 for ; Mon, 25 Jun 2007 14:55:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from dbetts.vps.performancehosting.net (unknown [208.101.9.51]) by postgresql.org (Postfix) with SMTP id 384909FB3EE for ; Mon, 25 Jun 2007 14:55:29 -0300 (ADT) Received: (qmail 29477 invoked by uid 702); 25 Jun 2007 17:55:28 -0000 Received: from unknown (HELO ?127.0.0.1?) (75.162.185.96) by performancehosting.net with SMTP; 25 Jun 2007 17:55:28 -0000 Message-ID: <46800187.5000404@blueaxis.com> Date: Mon, 25 Jun 2007 11:55:19 -0600 From: Derrick Betts Reply-To: list@blueaxis.com Organization: Blue Axis User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Joshua CC: pgsql-novice@postgresql.org Subject: Re: yet another simple SQL question References: <467FFEF9.5050603@joshuaneil.com> In-Reply-To: <467FFEF9.5050603@joshuaneil.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/172 X-Sequence-Number: 19070 I would use the same string functions and tools that you used in the previous solution. Look for whitespace, and then break up the string based on that character. The function list is located here for your reference: http://www.postgresql.org/docs/8.2/static/functions-string.html Joshua wrote: > Ok, > > You guys must be getting sick of these newbie questions, but I can't > resist since I am learning a lot from these email lists and getting > results quick! Thanks to everyone for their contributions. > > Here is my questions.... > > I have a column that looks like this > > firstname > ----------------- > John B > Mark A > Jennifer D > > Basically I have the first name followed by a middle initial. Is there a > quick command I can run to strip the middle initial? Basically, I just > need to delete the middle initial so the column would then look like the > following: > > firstname > --------------- > John > Mark > Jennifer > > Thanks again for all of your help today. Everything you guys have been > sending has produced successful results. > > Thanks. > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > > >