Re: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?

From: "codeWarrior" <gpatnude(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?
Date: 2006-01-24 16:08:59
Message-ID: dr5jdu$fj5$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

SELECT fieldlist, CASE WHEN myboolean = true THEN 1 ELSE 0 END
FROM tblname WHERE condition;

""Jesper K. Pedersen"" <jkp(at)solnet(dot)homeip(dot)net> wrote in message
news:20060122211351(dot)371f20d8(at)io(dot)solnet(dot)(dot)(dot)
>
> I am have some difficulties converting the Microsoft field of type
> YESNO (which is a simple boolean true/false) to something that is
> compatible with PostgreSQL.
>
> I have tried with both boolean, bit(1) and even integer to try and get
> it to work but with no success - Access see the boolean and bit(1) as
> "text" fields.
>
> This mean that I am not able to use the built-in form input fields for
> the "YESNO" field type.
>
> Anyone with any ideas on how to get around this?
>
> Thank's
> Jesper K. Pedersen
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bath, David 2006-01-25 01:05:09 Re: How to implement Microsoft Access boolean (YESNO)
Previous Message Tom Lane 2006-01-24 14:59:01 Re: How to implement Microsoft Access boolean (YESNO)