X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 7E6AC30FB88 for ; Tue, 10 Jun 2003 08:49:48 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 59912-04 for ; Tue, 10 Jun 2003 05:49:38 -0300 (ADT) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by svr1.postgresql.org (Postfix) with ESMTP id 7E45F311141 for ; Tue, 10 Jun 2003 04:20:49 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 19PdR3-0002on-0U; Tue, 10 Jun 2003 08:20:49 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id D7FDF1662D; Tue, 10 Jun 2003 08:20:47 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 13F3316617; Tue, 10 Jun 2003 08:20:47 +0100 (BST) Content-Type: text/plain; charset="utf-8" From: Richard Huxton Organization: Archonet Ltd To: Rado Petrik , pgsql-sql@postgresql.org Subject: Re: Retype Date: Tue, 10 Jun 2003 08:20:44 +0100 User-Agent: KMail/1.4.3 References: <1055150663.1819.9.camel@caj> In-Reply-To: <1055150663.1819.9.camel@caj> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200306100820.44251.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Archive-Number: 200306/77 X-Sequence-Number: 13835 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 --=20 Richard Huxton