| From: | Hafsteinn Þór Hafsteinsson <hafsteinn(at)nervus(dot)is> |
|---|---|
| To: | "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Compare bit and int4 |
| Date: | 2001-06-29 10:41:55 |
| Message-ID: | 5182ED915DE3D211842000600852EB953A8F7F@firebat.nervus.is |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Hi, I need to be able to do something like this:
select * from tblTable where bField=1
and bField is defined as 'bit'. I know i can avoid getting this error:
"Unable to identify an operator '=' for types 'bit and 'int4'
You will have to retype this query using an explicit cast"
by changing the 1 to CAST(1 as bit), but that's not an option (query
will be run on both Access and PostgreSQL). How can i create
an operator/function to handle this automatically?
thx!
-haffi
| From | Date | Subject | |
|---|---|---|---|
| Next Message | ericnielsen@earthlink.net | 2001-06-29 17:22:59 | Understanding query tuning |
| Previous Message | Zavier Sheran | 2001-06-29 04:09:22 | Upgrade from 7.0.3 to 7.1.2 |