Re: plpgsql loop not returning value
От | Michael Fuhr |
---|---|
Тема | Re: plpgsql loop not returning value |
Дата | |
Msg-id | 20041016162034.GA71806@winnie.fuhr.org обсуждение исходный текст |
Ответ на | Re: plpgsql loop not returning value (Josh Close <narshe@gmail.com>) |
Ответы |
Re: plpgsql loop not returning value
|
Список | pgsql-general |
On Sat, Oct 16, 2004 at 09:30:32AM -0500, Josh Close wrote: > On Sat, 16 Oct 2004 00:59:34 -0600, Michael Fuhr <mike@fuhr.org> wrote: > > > > Add some RAISE INFO statements to print variables' values at key > > places. I wonder if one of your SUMs is returning NULL, causing > > your addition to evaluate to NULL. If so, then perhaps you should > > use COALESCE to turn those NULLs into zeros. > > Thanks. That's exactly what was happening. I'm still new to postgres. Glad you got it working. A question about your design: you appear to have a tblBatchHistory_X table for each iId value in tblServers. Is there a reason for doing that instead of having a single tblBatchHistory table with a foreign key reference to tblServers? -- Michael Fuhr http://www.fuhr.org/~mfuhr/
В списке pgsql-general по дате отправления: