Thanks for the inspiration Vivek!
Didn't quite work, but when I made it...
dSalesHdrDateDue + (iAcctPayDaysAv || 'Days')::INTERVAL
BINGO! it works.
Happiness is :-)
Graham Coates
"Vivek Khera" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>>>> "GC" == Graham Coates <[EMAIL PROTECTED]> writes:
>
> GC> SELECT Invoices.InvoiceDate + INTERVAL '41 Days'
> GC> works fine
> GC> but when trying to substitute the number of days with a value form a
field
> GC> e.g.
>
> GC> SELECT Invoices.InvoiceDate + INTERVAL Acct.AverageDaysToPay 'Days'
>
> try
>
> SELECT Invoices.InvoiceDate + Acct.AverageDaysToPay::interval
>
>
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Vivek Khera, Ph.D. Khera Communications, Inc.
> Internet: [EMAIL PROTECTED] Rockville, MD +1-240-453-8497
> AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl