How to cast a boolean into an int2 ?

From: Valerio Santinelli <tanis(at)mediacom(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: How to cast a boolean into an int2 ?
Date: 1999-02-24 14:26:23
Message-ID: 36D4282F.EBABB912@mediacom.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How do I cast a boolean into an int2 ?

I want to do something like:

INSERT INTO test SELECT id, (demo='t') from temp;

but the second field isn't a boolean in the "test" table but an int2.

--

C'ya!

Valerio Santinelli a.k.a. TANiS
[tanis(at)mediacom(dot)it]+:+[http://www.mediacom.it/~tanis]

Browse pgsql-general by date

  From Date Subject
Next Message jose' soares 1999-02-24 14:39:32 Re: [GENERAL] timestamps
Previous Message Daryl W. Dunbar 1999-02-24 13:44:54 RE: [GENERAL] ISP with PostgreSQL