X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5F9459FB3C9 for ; Thu, 31 Aug 2006 12:34:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 54648-02-6 for ; Thu, 31 Aug 2006 15:34:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by postgresql.org (Postfix) with ESMTP id AEAFF9FB416 for ; Thu, 31 Aug 2006 12:29:29 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d80so776997pyd for ; Thu, 31 Aug 2006 08:29:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=CiVEm5iZJK9PqxIQAZbC4/XFY950abfxk+mWiubxgXdZEshuV0xZ4IGcTkMtkUrd3xvwqp8wzlX59T4bLR6vJptxKqDHgQWaLAHHpz6CaHajc+VaEwemwKCMKJMv97kkwolcHOOwi42Uwy6tPIqCLiqE3Mj58W03B/Sx43JM/pk= Received: by 10.35.119.11 with SMTP id w11mr916625pym; Thu, 31 Aug 2006 08:29:28 -0700 (PDT) Received: by 10.35.80.9 with HTTP; Thu, 31 Aug 2006 08:29:28 -0700 (PDT) Message-ID: Date: Thu, 31 Aug 2006 10:29:28 -0500 From: "Aaron Bono" To: "Ezequias Rodrigues da Rocha" Subject: Re: Trigger with Stored Procedure [Client Points] Cc: pgsql-sql@postgresql.org In-Reply-To: <55c095e90608300456x4a24948fw9edc24aaa253c256@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_55213_7334490.1157038168518" References: <55c095e90608300456x4a24948fw9edc24aaa253c256@mail.gmail.com> X-Google-Sender-Auth: 41faa19cc354a950 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.2 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/251 X-Sequence-Number: 26209 ------=_Part_55213_7334490.1157038168518 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/30/06, Ezequias Rodrigues da Rocha wrote: > > Hi list, > > I have a table like this: > > Points > --------------------------------- > Id > operation > value > > and another two tables like this > > Client Rule > ------------------------ ----------------------- > id id > name percent > Points > > > ps: The Points table is a table that represent each moviment of the > Client. > > > I need to make a trigger that see after all insert on Points table and > update the client table based on the percent on the Rule table. > > Anyone that would like to help me I will be very welcomed. > I am not exactly sure what you are trying to do here. Can you provide an example of the data and what you want to occur? ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_Part_55213_7334490.1157038168518 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/30/06, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
Hi list,

I have a table like this:

Points
---------------------------------
Id
operation
value

and another two tables like this

Client                                        Rule
------------------------                       -----------------------
id                                             id
name                                       percent
Points


ps: The Points table is a table that represent each moviment of the Client.


I need to make a trigger that see after all insert on Points table and update the client table based on the percent on the Rule table.

Anyone that would like to help me I will be very welcomed.

 
I am not exactly sure what you are trying to do here.  Can you provide an example of the data and what you want to occur?

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
================================================================== ------=_Part_55213_7334490.1157038168518--