select returning mysterious null rows

Поиск
Список
Период
Сортировка
От webmaster@duluoz.net
Тема select returning mysterious null rows
Дата
Msg-id 20000222204332.22306.qmail@paradise.duluoz.net
обсуждение исходный текст
Список pgsql-sql
Hi-
 I've got the following query:

select d.domain, p.lname, b.period, b.billed_thru,sum(i.monthly*b.period*discount(b.period)::float) as amountfrom
billingb, domain d, opt_info i,opt_list_domains l, plans pwhere b.billed_thru <= '$today'and b.domain = d.domainand
l.domain= d.domainand i.sname = l.optand p.sname = d.base_plangroup by domain, lname, period, billed_thru
 

It works fine when there are any matching tuples, but when there are
no matches, I get a row returned anyway, with all null fields.  The
null tuple isn't returned if any other tuples are -- only by itself.
Can anybody explain what's happening here?  I'm using PostgreSQL
6.5.3, and I've seen this behaviour both in psql and through PHP.

-mike

-- 

Mike Glover                            webmaster@duluoz.net
Duluoz Networks                        http://www.duluoz.net



В списке pgsql-sql по дате отправления:

Предыдущее
От: Thomas Frei
Дата:
Сообщение: HOWTO create BLOB fields?
Следующее
От: Gordon Clarke
Дата:
Сообщение: pg_group system table