Subject | Re: [firebird-support] Re: Using COMPUTED fields to provide lookup results and allow backup/restore |
---|---|
Author | Nando Dessena |
Post date | 2003-07-18T17:34:05Z |
Raymond,
R> SELECT P."Paddock", FgP."Qty Fed", FI."Batch", FL."Location"
R> FROM "Feeding Paddock" FgP
R> JOIN "Paddock" P ON FgP."Paddock ID" = P.ID
R> JOIN "Feeding Inventory" FgI ON FgP.ID = FgI."Feeding
R> Inventory ID"
R> JOIN "Feed Inventory Location" FIL ON FgI."Inventory Location
R> ID" = FIL.ID
R> JOIN "Feed Inventory" FI ON FIL."Inventory ID" =
R> FI.ID
R> JOIN "Feed Location" FL ON FIL."Location ID" =
R> FL.ID;
R> and I thought it would be best to avoid having to specify this in
R> client code.
R> Would a VIEW for this SELECT allow me to add/edit/delete records from
R> the "Feeding Paddock" table?
Yes, provided it is equiped with suitable before insert, before update
and before delete triggers. Look up the manuals for details on how to
make an updatable view.
Ciao
--
Nando mailto:nandod@...
R> SELECT P."Paddock", FgP."Qty Fed", FI."Batch", FL."Location"
R> FROM "Feeding Paddock" FgP
R> JOIN "Paddock" P ON FgP."Paddock ID" = P.ID
R> JOIN "Feeding Inventory" FgI ON FgP.ID = FgI."Feeding
R> Inventory ID"
R> JOIN "Feed Inventory Location" FIL ON FgI."Inventory Location
R> ID" = FIL.ID
R> JOIN "Feed Inventory" FI ON FIL."Inventory ID" =
R> FI.ID
R> JOIN "Feed Location" FL ON FIL."Location ID" =
R> FL.ID;
R> and I thought it would be best to avoid having to specify this in
R> client code.
R> Would a VIEW for this SELECT allow me to add/edit/delete records from
R> the "Feeding Paddock" table?
Yes, provided it is equiped with suitable before insert, before update
and before delete triggers. Look up the manuals for details on how to
make an updatable view.
Ciao
--
Nando mailto:nandod@...