From: | "Mihai Gheorghiu" <tanethq(at)earthlink(dot)net> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Interfacing with MSAccess |
Date: | 2001-07-09 21:03:31 |
Message-ID: | 02b901c108ba$ab3374e0$6e646464@New6.Travel |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Exporting tables from Access to PG using ODBC driver Greatbridge 1.00.0000.
Function in PG to check data validity:
CREATE FUNCTION my_MonthlyPayment (NUMERIC, NUMERIC, INTEGER)
RETURNS NUMERIC
-- Returns monthly payment for $1: loan
-- $2: annual interest rate, in %
-- $3: number of months
AS
'
SELECT CASE
WHEN $2 :: float = 0.00 THEN
($1 :: float / $3)
:: NUMERIC(7,2)
ELSE
($1 :: float * $2 :: float / 1200.00 *
(1.00 + $2 :: float / 1200.00) ^ $3 :: float /
((1.00 + $2 :: float / 1200.00) ^ $3 :: float - 1.00))
:: NUMERIC(7,2)
END
;'
LANGUAGE 'sql';
After some processing (query progress indicator at half) the following error
message pops up:
Error while executing the query(non-fatal);
ERROR: fmgr_info: function 1350878: cache lookup failed (#-1)
Please help.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-07-09 21:08:38 | Re: QUERY - Including the new LDP PostgreSQL HOWTO in the main PostgreSQL distribution |
Previous Message | Matt Block | 2001-07-09 20:38:57 | dump |