Where clause... - Mailing list pgsql-novice

From Didier Gasser-Morlay
Subject Where clause...
Date
Msg-id 608b66ce0802030026h57f54c8fg43c459743d59e234@mail.gmail.com
Whole thread Raw
Responses Re: Where clause...  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-novice
Hello,

I have a table which a column "fee_type " declared as char(1)

The column can contain 'I' (uppercase i), 'C' or 'R'

When querying with Select * from <table> where fee_type in ('I', 'C')

the query returns nothing.

The query returns the rows I am expecting when doing one of the following:

where fee_type ilike ('I') or fee_type ilike ('C')
or
where fe.fee_type = chr(73) or fee_type = chr(67)
(this proves the value is indeed uppercase)

but nothing is returned either when I try
where fee_type like ('I') or fee_type like ('C')

I thought it would be related to the datatype so I tried casting the
'I' and 'C' to char(1), but I had no luck.

Could you give me a hint ?

thanks
Didier

pgsql-novice by date:

Previous
From: Raimon
Date:
Subject: Re: Multiple rows into one row
Next
From: "A. Kretschmer"
Date:
Subject: Re: Where clause...