Re: [SQL] Proper case function

2010-09-23 Thread Jonathan Brinkman
Here is a simple title-case function for Postgresql. Best, Jonathan CREATE OR REPLACE FUNCTION "format_titlecase" ( "v_inputstring" varchar ) RETURNS varchar AS $body$ /* select * from Format_TitleCase('MR DOG BREATH'); select * from Format_TitleCase('each word, mcclure of this string:shall be

Re: [SQL] Proper case function

2010-01-06 Thread John Summerfield
Michael Gould wrote: Gary, Based on what I read it wouldn't handle cases where the result should be MacDonald from macdonald. There are other cases such as the sentence below I've looked at rationalising names in this manner before, and found that, depending on the individual, both Macdonal

Re: [SQL] Proper case function

2010-01-01 Thread Jasen Betts
On 2009-12-31, Michael Gould wrote: > Gary, > > Based on what I read it wouldn't handle cases where the result should be > > MacDonald from macdonald. There are other cases such as the sentence below > > ('it''s crazy! i couldn''t believe kate mcdonald, leo dicaprio, (terrence) > trent d''arby (c

Re: [SQL] Proper case function

2009-12-31 Thread Seth Gordon
Michael Gould wrote: Gary, Based on what I read it wouldn't handle cases where the result should be MacDonald from macdonald. A function that translates “macdonald” to “MacDonald” would also translate “mackintosh” (the raincoat) to “MacKintosh”, unless you write it *really really* cleverly.

Re: [SQL] Proper case function

2009-12-31 Thread Tim Landscheidt
Michael Gould wrote: > Based on what I read it wouldn't handle cases where the result should be > MacDonald from macdonald. There are other cases such as the sentence below > ('it''s crazy! i couldn''t believe kate mcdonald, leo dicaprio, (terrence) > trent d''arby (circa the 80''s), and jada

Re: [SQL] Proper case function

2009-12-31 Thread Michael Gould
Gary, Based on what I read it wouldn't handle cases where the result should be MacDonald from macdonald. There are other cases such as the sentence below ('it''s crazy! i couldn''t believe kate mcdonald, leo dicaprio, (terrence) trent d''arby (circa the 80''s), and jada pinkett-smith all showed

Re: [SQL] Proper case function

2009-12-31 Thread Gary Chambers
> Has anyone got a proper case function that they are willing to share.  We're > moving from SQL Anywhere to PostgreSQL and decided that much of our data is > upper case when it really should be proper cased.  The columns that we will > be putting proper case data in are all defined using the contr