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