| From: | "Didier Gasser-Morlay" <didiergm(at)gmail(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Where clause... |
| Date: | 2008-02-03 08:26:34 |
| Message-ID: | 608b66ce0802030026h57f54c8fg43c459743d59e234@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | A. Kretschmer | 2008-02-03 08:41:14 | Re: Where clause... |
| Previous Message | Raimon | 2008-02-02 18:42:24 | Re: Multiple rows into one row |