Re: conversion a numero

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Juan <smalltalker(dot)marcelo(at)gmail(dot)com>
Cc: Ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: conversion a numero
Date: 2010-09-29 19:06:43
Message-ID: AANLkTik+V+bfXhMbSBJ6Sp5wy=0gxkQvLk-K7F40R+oD@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

2010/9/29 Juan <smalltalker(dot)marcelo(at)gmail(dot)com>:
> Gente
>
> tengo un problema ,necesito convertir a numero o float ( con decimales )
> un character varying,
> por ejemplo
>
> '0.00121' --> 0.00121
> '100.23'   -> 100.23
> '123'   ->     123
>
> que funcion aplican para lograr dicha conversion?

ya probaste usar un cast?

select '0.00121'::numeric

--
Jaime Casanova         www.2ndQuadrant.com
Soporte y capacitación de PostgreSQL

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Juan 2010-09-29 19:21:02 Re: conversion a numero
Previous Message Juan 2010-09-29 19:04:03 conversion a numero