Re: get_next_billing_date() ...

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: get_next_billing_date() ...
Date: 2006-10-16 17:25:31
Message-ID: 48005C28206BC8E3F8F77C61@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--On Monday, October 16, 2006 09:53:56 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
>> In fact, more info to work with ... it likes the date, just not when I use it
>> as part of a SELECT query of a table ...
>
> I suspect it's not so much the "table" part as some specific value of
> the date coming from the table --- can you find out what value it's
> failing on?

That's the thing ... the one example I sent only returns one record, and if I
plug in the timestamp value that it returns directly, it doesn't fail ...

Got it, and the error message in no way indicates ...

I created the function 'timestamp with time zone' ... the field in the table is
'timestamp without time zone' ... fix the function , and voila:

company_id | get_next_billing_date
------------+----------------------------
708 | 2006-12-13 14:09:11.442111
679 | 2006-10-25 11:04:00.117714
771 | 2006-11-03 15:09:19.491958
688 | 2006-11-11 18:18:42.23105
701 | 2006-11-28 11:45:36.182217
656 | 2006-11-05 20:46:01.335434
703 | 2006-11-28 19:35:25.081577
704 | 2006-12-05 21:53:57.122358
756 | 2007-01-02 14:18:22.11068

I knew it had to be *somethign* stupid :(

Thx ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . scrappy(at)hub(dot)org MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2006-10-16 17:51:10 Re: deleting rows in specific order
Previous Message Penchalaiah P. 2006-10-16 14:47:01 hi i want help on levels