Subject | Re: Computed column madness |
---|---|
Author | William L. Thomson Jr. |
Post date | 2006-02-08T19:51:59Z |
Bill,
Thank you very much!!!!!
Thank you very much!!!!!
--- In firebird-support@yahoogroups.com, "Bill Meaney" <wameaney@...> wrote:
>
> Try this
>
> ITEM_TOTAL COMPUTED BY (CAST ((RATE*QUANTITY) AS NUMERIC(9,2))),
>
Thought I tried that but guess not. What's weird is on the actual
invoices table I do the same thing, but no error? The invoice table is
created before the INVOICE_ITEMS table.
CREATE TABLE INVOICES (
NUM NUMERIC_18_0 NOT NULL,
CREATED TIMESTAMP_NOW NOT NULL,
STATUS VARCHAR_15 NOT NULL, ,
TOTAL NUMERIC_9_2 NOT NULL,
PAYMENTS NUMERIC_9_2 NOT NULL,
BALANCE COMPUTED BY (CAST(TOTAL-PAYMENTS AS NUMERIC(9,2))),
CONSTRAINT PK_INVOICES PRIMARY KEY (NUM)
);
Ah crap, I see now, I had my brackets out of order, doohh :o
--
Sincerely,
William L. Thomson Jr.
Obsidian-Studios, Inc.
http://www.obsidian-studios.com