Re: Retype

From: Richard Huxton <dev(at)archonet(dot)com>
To: Rado Petrik <r(dot)p(at)szm(dot)sk>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Retype
Date: 2003-06-10 07:20:44
Message-ID: 200306100820.44251.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Monday 09 Jun 2003 10:24 am, Rado Petrik wrote:
> I have query " SELECT id_user FROM user WHERE (freg_u & 2 ) > 0 ".
>
> freg_u is type smallint.

> How I retype freg_u to interger ?
... WHERE (freg_u::integer & 2) ...

Or you could use the more standard but long-winded CAST function

--
Richard Huxton

In response to

  • Retype at 2003-06-09 09:24:24 from Rado Petrik

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2003-06-10 11:57:10 Re: Coalesce/Join/Entries may not exist.
Previous Message Forest Wilkinson 2003-06-09 20:23:35 how to determine array size