realbasic-nug
[Top] [All Lists]

Re: REALSQLDatabase and Boolean values

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: REALSQLDatabase and Boolean values
From: Dr Gerard Hammond <realbasic at macsos dot com dot au>
Date: Fri, 29 Jun 2007 15:33:05 +1000
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <fed2e2560706282201n26376305nd90feec4a85b27d8 at mail dot gmail dot com>
I had a similar problem.
I switched it to an integer field and never looked back.....

At 10:01 PM -0700 28/6/07, Dennis Birch wrote:
>What is the correct syntax for selecting records in a REALSQLDatabase
>based on a field defined as a Boolean?
>
>I have tried "SELECT myField FROM myTable WHERE myBooleanField = 0" // false
>which works exactly as it should.
>
>I have also succeeded with "SELECT myField FROM myTable WHERE
>myBooleanField = 'True'"
>
>But none of the following work:
>
>"SELECT myField FROM myTable WHERE myBooleanField = 'False'"
>"SELECT myField FROM myTable WHERE myBooleanField = 'false'"
>"SELECT myField FROM myTable WHERE myBooleanField = 1"
>
>I'm testing this on a table that has records that show either "True"
>or "False" in my boolean field when I browse them. But when I try to
>select them with any of the second set of SELECT statements above, I
>get 0 records back. Am I doing something wrong, or does the
>REALSQLdatabase have a wacky sense of humor about how to select
>boolean values?
>_______________________________________________
>Unsubscribe or switch delivery mode:
><http://www.realsoftware.com/support/listmanager/>
>
>Search the archives:
><http://support.realsoftware.com/listarchives/lists.html>


-- 

Cheers,

Dr Gerard Hammond
MacSOS Solutions
http://www.macsos.com.au
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>