| From: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | null answer - how? |
| Date: | 2001-09-19 17:17:00 |
| Message-ID: | 20010919181700.Q4398@quartz.newn.cam.ac.uk |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
select coalesce(sum(deltafromoctets),0)
from trans,stats
where stats_id=stats.id
and (timeslicet < '1:05' OR timeslicet > '6:05')
returns a number (9188191930), whereas
select coalesce(sum(deltafromoctets),0)
from trans,stats
where stats_id=stats.id
and (timeslicet < '1:05' OR timeslicet > '6:05')
and timesliced < '01-May-2001'
prints 0 (or null without the coalesce) as does
select coalesce(sum(deltafromoctets),0)
from trans,stats
where stats_id=stats.id
and timesliced < '01-May-2001'
How can this be?
select * from stats where timesliced is null or timeslicet is null
select * from trans where deltafromoctets is null
both retun 0 rows.
stats_id and stats.id are "not null"
timesliced date, timeslicet time, deltrafromoctets bigint.
Any hints?
Cheers,
Patrick
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Arne Weiner | 2001-09-19 17:22:19 | Re: Why, why, why |
| Previous Message | Chris Bowlby | 2001-09-19 16:39:05 | Re: www.postgresql.org |