[SQL] error dropping operator

2007-09-18 Thread Sabin Coanda
Hi there, I don't have experience with operators. I built one and when I tried to drop it I got th efollowing error: cannot drop operator ... because it is required by the database system. How do I drop it please ? TIA, Sabin ---(end of broadcast)---

Re: [SQL] Table transform query

2007-09-18 Thread Rodrigo De León
On 9/18/07, Philippe Lang <[EMAIL PROTECTED]> wrote: > ... into this: > > > serial dateL dateR > > 1 1 2 > 1 4 > 2 1 2 > 3 1 3 > 4 2 3 > 5 3 SELECT t1.serial, t1.DATE AS datel, t2.DATE AS dater FROM t t1 LEFT JOIN

[SQL] Table transform query

2007-09-18 Thread Philippe Lang
Hi, I'm trying to find out how to transform this kind of table data (history of rental data in a firm): date serial delivery -- 1 1 L 1 2 L 1 3 L 2 1 R 2 2 R 2 4 L 3 5 L 3 3 R 3 4 R 4

Re: [SQL] Table transform query

2007-09-18 Thread Philippe Lang
[EMAIL PROTECTED] wrote: > Hi, > > I'm trying to find out how to transform this kind of table data > (history of rental data in a firm): ... I have answred my own question: yes, there is a pure SQL solution, with a subselect: CREATE TABLE foo ( serial integer, delivery character(

Re: [SQL] error dropping operator

2007-09-18 Thread Tom Lane
"Sabin Coanda" <[EMAIL PROTECTED]> writes: > I don't have experience with operators. I built one and when I tried to drop > it I got th efollowing error: cannot drop operator ... because it is > required by the database system. > How do I drop it please ? Well, you need to drop *your* operator,

Re: [SQL] Extracting hostname from URI column

2007-09-18 Thread John Summerfield
Paul Lambert wrote: Paul Lambert wrote: chester c young wrote: I'm trying to use substr() and position() functions to extract the full host name (and later a domain) from a column that holds URLs. substring( href from '.*://\([^/]*)' ); Ok, your solution looks better than mine... but I hav