[SQL] loading a file into a field

2009-12-31 Thread Brian Sherwood
I am looking to play around with the postgres XML functions, but can't seem to find a way to load my data. I have a number of XML files: file1.xml, file2.xml, etc All files follow the same xml format (DTD?) I would like to create the following table: CREATE TABLE configs ( filename

Re: [SQL] Using || operator to fold multiple columns into one

2009-12-31 Thread Rosser Schwarz
On Tue, Dec 29, 2009 at 4:44 PM, Bryce Nesbitt wrote: > Craig is correct in the OP attempt.   All but one field is intended to be null Ah; my misunderstanding, then. Sorry for the noise. > Duplicate rows, or data in multiple columns, would wreck havoc on the > scheme.  If there is a better way

[SQL] Proper case function

2009-12-31 Thread Michael Gould
All, 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 contrib

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

Re: [SQL] loading a file into a field

2009-12-31 Thread Tim Landscheidt
Brian Sherwood wrote: > I am looking to play around with the postgres XML functions, but can't > seem to find a way to load my data. > I have a number of XML files: file1.xml, file2.xml, etc All files > follow the same xml format (DTD?) > I would like to create the following table: > CREA

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 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 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.