Article View: borland.public.interbase.sql
Article #11160Re: Simple SQL question (I guess)
From: Sergio Gonzalez
Date: Wed, 04 Dec 2002 17:02
Date: Wed, 04 Dec 2002 17:02
30 lines
1960 bytes
1960 bytes
Thanks for replying Allen You're right. I guess I should use an AFTER INSERT trigger in Items also. Since I need the table COST be updated each time the ITEMS table grows and each time the TCOST table grows (I could append a new tax in the calculation on the cost of an item) Mi question is: is there a way to insert all the records together in a single INSERT statement? i.e.: if I insert a record in TCOST (lets say tcost_id = 3) then I need to insert in COST two records (id = 1, tcost_id = 3 and id = 2, tcost_id = 3) Hope I am clear, since my English is terrible and my SQL knowledge worst!!! Thanks! Sergio. "G. Allen Casteran" <allen@nisinc.com> escribi๏ฟฝ en el mensaje news:MPG.1856dee099f1cad4989686@forums.borland.com... > Sergio, > > The best way to do this is an AFTER INSERT trigger on the Items table. > Do you also need an AFTER DELETE? > > Allen
Technical Details
Message-ID:
<3dee5018@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3decf30f@newsgroups.borland.com> <MPG.1856dee099f1cad4989686@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 114a0e,9ff790979c64f2be X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-04 11:09:52 PST Reply-To: "Sergio Gonzalez" <shg@sion.com> From: "Sergio Gonzalez" <shg@sion.com> Newsgroups: borland.public.interbase.sql References: <3decf30f@newsgroups.borland.com> <MPG.1856dee099f1cad4989686@forums.borland.com> Subject: Re: Simple SQL question (I guess) Date: Wed, 4 Dec 2002 14:02:23 -0300 Lines: 33 Organization: SG X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 200.69.36.61 Message-ID: <3dee5018@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039028248 200.69.36.61 (4 Dec 2002 10:57:28 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail