X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (unknown [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id C68689FB2D5 for ; Wed, 30 Aug 2006 08:59:07 -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 61174-04-6 for ; Wed, 30 Aug 2006 11:58:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 8D0B99FB2BB for ; Wed, 30 Aug 2006 08:56:34 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id m3so164043ugc for ; Wed, 30 Aug 2006 04:56:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=mfQUecZ17ArY5Jg4RevWd4FzYHzKi5NoYFm5a89dUBrwCHBWqwEElH0rkKVeSuHjknpBjNhAvlTFtoyPZHOtpXRYkivh+1dI1Wvn+NtDYRqDf7docIBIVzAzTmDNKj6v5d2oThBB1LJRIB08QvbVpeR7xEiblVG+AuRWKT0fivg= Received: by 10.67.21.11 with SMTP id y11mr301180ugi; Wed, 30 Aug 2006 04:56:32 -0700 (PDT) Received: by 10.67.118.11 with HTTP; Wed, 30 Aug 2006 04:56:32 -0700 (PDT) Message-ID: <55c095e90608300456x4a24948fw9edc24aaa253c256@mail.gmail.com> Date: Wed, 30 Aug 2006 08:56:32 -0300 From: "Ezequias Rodrigues da Rocha" To: pgsql-sql@postgresql.org Subject: Trigger with Stored Procedure [Client Points] MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_33684_26244336.1156938992686" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.134 tagged_above=0 required=5 tests=HTML_50_60, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/236 X-Sequence-Number: 26194 ------=_Part_33684_26244336.1156938992686 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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. My best regards ... Ezequias I must do trigger to update a table based on a field a Stored Procedure to update a table based --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ ------=_Part_33684_26244336.1156938992686 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi list,

I have a table like this:

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

and another two tables= like this

Client        &nb= sp;            =             &nb= sp;      Rule
------------------------        &nb= sp;            =   -----------------------
id      &nb= sp;            =             &nb= sp;            = id
name          &nbs= p;            &= nbsp;           &nbs= p;   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 Po= ints table and update the client table based on the percent on the Rule tab= le.

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

M= y best regards ...
Ezequias






I must do trigger= to update a table based on a field a Stored Procedure to update a table ba= sed

--
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-
       &nbs= p;            &= nbsp;           &nbs= p; Atenciosamente (Sincerely)
      &= nbsp;           &nbs= p;     Ezequias Rodrigues da Rocha
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-A pior das democracias ainda =E9 melhor do que a melhor das ditaduras
T= he worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.bl= ogspot.com/ ------=_Part_33684_26244336.1156938992686--