From: | Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | mogas(at)aveiro-digital(dot)net |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: |
Date: | 2003-06-12 15:20:21 |
Message-ID: | 20030612152021.GE7797@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jun 12, 2003 at 10:16:13AM +0100, mogas(at)aveiro-digital(dot)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[(at)]dcc(dot)uchile(dot)cl>)
"La realidad se compone de muchos sueos, todos ellos diferentes,
pero en cierto aspecto, parecidos..." (Yo, hablando de sueos erticos)
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-06-12 15:24:31 | Re: full featured alter table? |
Previous Message | Edmund Dengler | 2003-06-12 15:18:41 | Re: Performance of query (fwd) |