Re: [SQL] How to implement Microsoft Access boolean (YESNO)

2006-01-29 Thread Bath, David
On Tue, 24 Jan 2006 07:53, Greg Stark wrote: > > Having checked the I/O format it seems that MS Access exports the > > values of a YESNO field as 0 and 1 Hmmm. I may be wrong, but last time I looked (a year or so ago), when I cast MS-Access yes/no fields to numerics, it gave me 0=no or all_bits_o

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

2006-01-24 Thread codeWarrior
SELECT fieldlist, CASE WHEN myboolean = true THEN 1 ELSE 0 END FROM tblname WHERE condition; ""Jesper K. Pedersen"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I am have some difficulties converting the Microsoft field of type > YESNO (which is a simple boolean true/false)

Re: [SQL] How to implement Microsoft Access boolean (YESNO)

2006-01-24 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Is there an implicit cast from ints? So if I pass a 0 or 1 argument for a > boolean parameter now it'll work? That definitely didn't work in the past. 1. There's a cast. 2. It's not implicit. 3. You have always (well, at least since 7.0 which is the olde

Re: [SQL] How to implement Microsoft Access boolean (YESNO)

2006-01-24 Thread PFC
On Tue, 24 Jan 2006 06:03:48 +0100, Greg Stark <[EMAIL PROTECTED]> wrote: Tom Lane <[EMAIL PROTECTED]> writes: Greg Stark <[EMAIL PROTECTED]> writes: > "Jesper K. Pedersen" <[EMAIL PROTECTED]> writes: >> Having checked the I/O format it seems that MS Access exports the >> values of a YESNO fie

Re: [SQL] How to implement Microsoft Access boolean (YESNO)

2006-01-23 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > "Jesper K. Pedersen" <[EMAIL PROTECTED]> writes: > >> Having checked the I/O format it seems that MS Access exports the > >> values of a YESNO field as 0 and 1 > > > If only Postgres's boolean type were as helpful.

Re: [SQL] How to implement Microsoft Access boolean (YESNO)

2006-01-23 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > "Jesper K. Pedersen" <[EMAIL PROTECTED]> writes: >> Having checked the I/O format it seems that MS Access exports the >> values of a YESNO field as 0 and 1 > If only Postgres's boolean type were as helpful. There's a cast to int in 8.1, and you can roll-yo

Re: [SQL] How to implement Microsoft Access boolean (YESNO)

2006-01-23 Thread Greg Stark
"Jesper K. Pedersen" <[EMAIL PROTECTED]> writes: > Having checked the I/O format it seems that MS Access exports the > values of a YESNO field as 0 and 1 If only Postgres's boolean type were as helpful. -- greg ---(end of broadcast)--- TIP 3: H

Re: [SQL] How to implement Microsoft Access boolean (YESNO)

2006-01-22 Thread Jesper K. Pedersen
On Sun, 22 Jan 2006 15:46:11 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > "Jesper K. Pedersen" <[EMAIL PROTECTED]> writes: > > 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. >

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

2006-01-22 Thread Tom Lane
"Jesper K. Pedersen" <[EMAIL PROTECTED]> writes: > 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. Assume that we have no idea what that is ;-). What is the I/O format MSSQL uses f

[SQL] How to implement Microsoft Access boolean (YESNO) fieldtype in PostgreSQL ?

2006-01-22 Thread Jesper K. Pedersen
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