pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Rado Petrik <r.p@szm.sk>
To: pgsql-sql@postgresql.org
Subject: Re: Retype
Date: Tue, 10 Jun 2003 08:20:44 +0100
Message-ID: <200306100820.44251.dev@archonet.com> (raw)
In-Reply-To: <1055150663.1819.9.camel@caj>
References: <1055150663.1819.9.camel@caj>

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



view thread (2+ messages)

Message-ID: <200306100820.44251.dev@archonet.com>
Permalink:  ../200306100820.44251.dev@archonet.com/
Also on:    postgresql.org/message-id/200306100820.44251.dev@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, r.p@szm.sk
  Subject: Re: Retype
  In-Reply-To: <200306100820.44251.dev@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox