Re: - Mailing list pgsql-general

From Alvaro Herrera Munoz
Subject Re:
Date
Msg-id 20030612152021.GE7797@dcc.uchile.cl
Whole thread Raw
In response to ...  (<mogas@aveiro-digital.net>)
List pgsql-general
On Thu, Jun 12, 2003 at 10:16:13AM +0100, mogas@aveiro-digital.net wrote:

> I have a varchar variable that have inside something like 8:50. I need to
> broke it and cast each part into two integer variables (x=8 and y=50).

> If someone know how to do this please tell me to this mail if possible.

I think you can do something like
SELECT split_part('8:50', ':', 1), split_part('8:50', ':', 2);

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"La realidad se compone de muchos sue�os, todos ellos diferentes,
pero en cierto aspecto, parecidos..." (Yo, hablando de sue�os er�ticos)

pgsql-general by date:

Previous
From: Edmund Dengler
Date:
Subject: Re: Performance of query (fwd)
Next
From: Stephan Szabo
Date:
Subject: Re: full featured alter table?