Обсуждение: i need informarion regarding functions and arrays...

Поиск
Список
Период
Сортировка

i need informarion regarding functions and arrays...

От
"Penchalaiah P."
Дата:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Hi good evening to all……..</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Rcid    value</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">1<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">yes</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">2<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">no</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">3<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">yes</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">4<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">yes</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">5<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">no</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">6<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">yes</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">7<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">no</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">8<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">yes</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">9<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                     </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">no</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">10<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                 </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">yes</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">11<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                 </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">no</span></font><p class="MsoNormal"
style="margin-left:.75in;text-indent:-.5in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">12<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">                 </span></font></span></span></font><font face="Arial"
size="2"><spanstyle="font-size:10.0pt;font-family:Arial">no</span></font><p class="MsoNormal"
style="margin-left:.25in"><fontface="Arial" size="2"><span style="font-size:10.0pt;font-family:Arial"> </span></font><p
class="MsoNormal"style="margin-left:.25in"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"> </span></font><pclass="MsoNormal" style="margin-left:.25in"><font
face="Arial"size="2"><span style="font-size:10.0pt;font-family:Arial">this is the front end screen they will enter all
these12 in  values… then they will press save button… these values have to be store in rnt table… can u tell me how to
storeall these 12 values at a time in rnt table…</span></font><p class="MsoNormal" style="margin-left:.25in"><font
face="Arial"size="2"><span style="font-size:10.0pt;font-family:Arial">but I written one function for this but it is
acceptingonly one value at a time to insert…</span></font><p class="MsoNormal" style="margin-left:.25in"><font
face="Arial"size="2"><span style="font-size:10.0pt;font-family:Arial">this is the function…</span></font><p
class="MsoNormal"><fontface="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:
12.0pt">create or replace function rentfunc(in_rcid int4,in_value varchar) as ‘</span></font><p class="MsoNormal"><font
face="TimesNew Roman" size="3"><span style="font-size: 
12.0pt">begin</span></font><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"></span></font><pre><font face="Courier New" size="2"><span style="font-size:10.0pt">insert into
rnt(racid,auditorvalue)values ($1,$2);</span></font></pre><pre><font face="Courier New" size="2"><span
style="font-size:10.0pt">end;</span></font></pre><pre><fontface="Courier New" size="2"><span
style="font-size:10.0pt">‘language’plpgsql’;</span></font></pre><pre><fontface="Courier New" size="2"><span
style="font-size:10.0pt"> </span></font></pre><pre><fontface="Courier New" size="2"><span style="font-size:10.0pt">If
anyone knows how to store all these 12 values in a rnt table… let me know …..</span></font></pre><p
class="MsoNormal"><fontface="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">Thanks  &  Regards</span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">Penchal reddy </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Software Engineer           </span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">Infinite Computer Solutions </span></font></b><b><font color="red" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Exciting Times…Infinite Possibilities... </span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">SEI-CMMI level 5 </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">| </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">ISO 9001:2000</span></font><font color="navy"><span style="color:navy"></span></font></b><p
class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">IT SERVICES </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold">
BPO                                                                                                                                                                          
</span></font><fontcolor="navy"><span style="color:navy"></span></font></b><p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><fontcolor="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">Telecom </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Finance</span></font></b><b><font color="red"
face="Tahoma"size="1"><span style="font-size: 
8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Healthcare </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:red;
font-weight:bold">| </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Manufacturing</span></font></b><b><font
color="red"face="Tahoma" size="1"><span style="font-size: 
8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Energy & Utilities </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Retail& Distribution
</span></font></b><b><fontcolor="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><fontcolor="navy"
face="Tahoma"size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Government                                                        </span></font><font
color="navy"><spanstyle="color:navy"></span></font></b><p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><fontcolor="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">Tel +91-80-5193-0000(Ext:503)</span></font></b><b><font color="red" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Fax  +91-80-51930009 </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Cell No  +91-9980012376</span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold">www.infics.com</span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">          </span></font><font color="navy"><span style="color:navy"></span></font></b><p
class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:gray;font-weight:bold">Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/
orits Customers and is intended for use only by the individual or entity to which it is addressed, and may contain
informationthat is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended
recipientor it appears that this mail has been forwarded to you without proper authority, you are notified that any use
ordissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately
at</span></font></b><b><fontcolor="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:black;font-weight:bold"> </span></font></b><b><u><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:gray;
font-weight:bold">info.in@infics.com </span></font></u></b><b><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:gray;font-weight:bold">and delete this mail from your records.</span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 
12.0pt"> </span></font></div><table><tr><td bgcolor="#ffffff"><font color="#000000">Information transmitted by this
e-mailis proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the
individualor the entity to which it is addressed, and may contain information that is privileged, confidential or
exemptfrom disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been
forwardedto you without proper authority, you are notified that any use or dissemination of this information in any
manneris strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email
fromyour records.<br /></font></td></tr></table> 

Re: i need informarion regarding functions and arrays...

От
"Aaron Bono"
Дата:
On 8/2/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:

Hi good evening to all……..

 

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… then they will press save button… these values have to be store in rnt table… can u tell me how to store all these 12 values at a time in rnt table…

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

this is the function…

 

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… let me know …..

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

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
==================================================================