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 34EA89FB28E for ; Wed, 2 Aug 2006 21:14: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 05840-10 for ; Thu, 3 Aug 2006 00:13:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.205]) by postgresql.org (Postfix) with ESMTP id 5D2959FB22B for ; Wed, 2 Aug 2006 21:13:54 -0300 (ADT) Received: by wx-out-0102.google.com with SMTP id t13so924884wxc for ; Wed, 02 Aug 2006 17:13:52 -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=CZl2Q4NYtYZzVrLO1PpVpO+ynbf3IM5J2PBuF8L77WGJ3pU+JJCWkf8hY23VZXDAUjcXzT4Jd9e4dd/8jlIJb3+kUOQT21v1iGnhG6cxFHTHnF8FdPApiduTJ8IzwvirOcspsCX7/0N3UPbuJtX5lY7wwP++/XtjmfqwIVMUaVg= Received: by 10.78.157.8 with SMTP id f8mr571712hue; Wed, 02 Aug 2006 17:13:51 -0700 (PDT) Received: by 10.78.32.10 with HTTP; Wed, 2 Aug 2006 17:13:51 -0700 (PDT) Message-ID: Date: Wed, 2 Aug 2006 19:13:51 -0500 From: "Aaron Bono" To: "Penchalaiah P." Subject: Re: i need informarion regarding functions and arrays... Cc: pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_99333_8328101.1154564031257" References: X-Google-Sender-Auth: 6c7761020a1afa92 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.817 tagged_above=0 required=5 tests=HTML_MESSAGE, SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200608/22 X-Sequence-Number: 25980 ------=_Part_99333_8328101.1154564031257 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 8/2/06, Penchalaiah P. wrote: > > Hi good evening to all=85=85.. > > > > Rcid value > > 1 yes > > 2 no > > 3 yes > > 4 yes > > 5 no > > 6 yes > > 7 no > > 8 yes > > 9 no > > 10 yes > > 11 no > > 12 no > > > > > > this is the front end screen they will enter all these 12 in values=85 t= hen > they will press save button=85 these values have to be store in rnt table= =85 can > u tell me how to store all these 12 values at a time in rnt table=85 > > but I written one function for this but it is accepting only one value at > a time to insert=85 > > this is the function=85 > > > > create or replace function rentfunc(in_rcid int4,in_value varchar) as ' > > begin > > insert into rnt(racid,auditorvalue) values ($1,$2); > > end; > > 'language'plpgsql'; > > > > If any one knows how to store all these 12 values in a rnt table=85 let m= e know =85.. > > Why not just do a loop and run 12 separate inserts (or 12 separate calls to the function)? =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=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 Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com =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=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 ------=_Part_99333_8328101.1154564031257 Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 8/2/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:
=

Hi good evening to all=85=85..

 

Rcid    value

1     =             &nb= sp;   yes

2     =             &nb= sp;   no

3     =             &nb= sp;   yes

4     =             &nb= sp;   yes

5     =             &nb= sp;   no

6     =             &nb= sp;   yes

7     =             &nb= sp;   no

8     =             &nb= sp;   yes

9     =             &nb= sp;   no

10     = ;            yes

11     = ;            no

12     = ;            no

 

 

this is the front end screen th= ey will enter all these 12 in  values=85 then they will press save button= =85 these values have to be store in rnt table=85 can u tell me how to store all these 12 values at a time in rnt table=85

but I written one function for = this but it is accepting only one value at a time to insert=85

this is the function=85<= /font>

 

create or replace function rentfunc(in_rcid int4,in_value varchar) as '<= /span>

begin

insert into rnt(racid,auditorvalue) values ($1,$2);
en= d;
'language'plpgsql';
 <=
/pre>

If any one knows how to store all these 12=
 values in a rnt table=85 let me know =85..
=

Why not just do a loop and run 12 separate inse= rts (or 12 separate calls to the function)?

=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=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
&n= bsp;  Aaron Bono
   Aranya Software Technologies, Inc.   http://www.aranya.com=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=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 ------=_Part_99333_8328101.1154564031257--