Re: [SQL] Help with regexp-query

2011-08-02 Thread Tim Landscheidt
Johann Spies wrote: > I am struggling a bit to do the following type of update in a table. > I want the content of a field updated like this: > Original: > '0894396e-16bf-4e63-aa52-97fe7031eec9||50a6b47c-f69c-414d-bcb6-14bbe403de5f|||' > After update: > '|0894396e-16bf-4e63-aa52-97fe7031e

[SQL] Aggregating results across multiple partitions

2011-08-02 Thread Mike O'Connel
Hi I see that some queries are not Order(n) where n=number of partitions. However, if one were to run the query separately against different partitions and aggregate the results it could be Order(n). Can such an approach be implemented in a more generic manner in pgsql? Thanks Mike

[SQL] Re: [SQL] Help with regexp-query

2011-08-02 Thread Charlie
select id, regexp_replace(category, (E'\\|{2,}'), E'\|', 'g') as category from akb_articles limit 100 Backslash in regex doubled. Added global modifier to replace all occurrences. - Reply message - From: "Johann Spies" Date: Thu, Jul 28, 2011 8:20 am Subject: [SQL] Help with regexp-quer

Re: [SQL] to_char() accepting invalid dates?

2011-08-02 Thread THOMPSON, JARED (ATTBAPCO)
ERROR at line 1: ORA-01839: date not valid for month specified That error is coming on select to_date('20110231', 'MMDD') from dual; because there are not 31 days in February 2011, try this: select to_date('20110228', 'MMDD') from dual; Jared Thompson Internet Operations Group Of

[SQL] Help with regexp-query

2011-08-02 Thread Johann Spies
I am struggling a bit to do the following type of update in a table. I want the content of a field updated like this: Original: '0894396e-16bf-4e63-aa52-97fe7031eec9||50a6b47c-f69c-414d-bcb6-14bbe403de5f|||' After update: '|0894396e-16bf-4e63-aa52-97fe7031eec9|50a6b47c-f69c-414d-bcb6-14bb

Re: [SQL] why these results?

2011-08-02 Thread Wes James
Yes. Thanks to all that responded. That was it. -wes On Mon, Aug 1, 2011 at 5:01 PM, Steve Crawford wrote: > On 08/01/2011 03:50 PM, Wes James wrote: >> >> select count(*) from table; >> >> count >> --- >>    100 >> (1 row) >> >> >> is correct >> >> select count(*) from table where col::te