select * from chargehistory where "new" = 't';

Boolean values are 't' and 'f'.

        -----Original Message-----
        From:   Garry Dolley [SMTP:[EMAIL PROTECTED]]
        Sent:   Thursday, June 24, 1999 7:01 AM
        To:     [EMAIL PROTECTED]
        Subject:        [ADMIN] how to use boolean types

        For the life of me I can't find anywhere in the docs explaination on
how
        to use boolean types.  If it's there, I would LOVE to know where.
Here
        are the errors I'm getting, I would greatly appreciate help :)

        ERROR:  attribute 'true' not found
        avsdb=> select * from chargehistory where "new" = true::bool;
        ERROR:  RestrictionClauseSelectivity: bad value -1.998614
        avsdb=> select * from chargehistory where "new" = 1::bool;
        ERROR:  RestrictionClauseSelectivity: bad value -1.998614
        avsdb=> select * from chargehistory where "new" = y::bool;
        ERROR:  attribute 'y' not found
        avsdb=> select * from chargehistory where "new" = 234::bool;
        ERROR:  Bad boolean external representation '234'
        avsdb=> select * from chargehistory where "new" = 1::bool;
        ERROR:  RestrictionClauseSelectivity: bad value -1.998614
        avsdb=> select * from chargehistory where "new" = (1)::bool;
        ERROR:  RestrictionClauseSelectivity: bad value -1.998614
        avsdb=> select * from chargehistory where "new" = ('1')::bool;
        ERROR:  RestrictionClauseSelectivity: bad value -1.998614
        avsdb=> select * from chargehistory where "new" = ('34')::bool;
        ERROR:  Bad boolean external representation '34'
        avsdb=> select * from chargehistory where "new" = ('TRUE')::bool;
        ERROR:  RestrictionClauseSelectivity: bad value -1.998614
        avsdb=> select * from chargehistory where "new" = ('0')::bool;
        ERROR:  RestrictionClauseSelectivity: bad value -1.998614
        avsdb=> select * from chargehistory where "new" = ('0')::bool;
        ERROR:  RestrictionClauseSelectivity: bad value -1.998614


        My "new" column is of the boolean type.  I can change the name of
"new"
        to anything else and it still won't work.  I simply can't seem to be
        able to properly cast to the boolean type.  I've been trying this
for
        about an hour and would really appreciate someone who can save me
some
        time on figuring this out ;) thanks in advance for help.

        --
        Garry Dolley

Reply via email to