----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: DecidedMTR Message 3 in Discussion <o:p> </o:p> <o:p> </o:p> -----Original Message----- From: BalajiKrishnan [mailto:[EMAIL PROTECTED] Sent: <st1:date Month="12" Day="26" Year="2003">Friday, December 26, 2003</st1:date> <st1:time Hour="15" Minute="57">3:57 PM</st1:time> To: BDOTNET Subject: Sql query <o:p> </o:p> <o:p></o:p> Hi Balaji Krishnan,<o:p></o:p> <o:p></o:p> For <st1:City><st1:place>ur</st1:place></st1:City> question the answer is:<o:p></o:p> create or replace procedure bill_update<o:p></o:p> is<o:p></o:p> cursor c1 is select billno,sum(itemamt) as netamt from bill_no group by billno;<o:p></o:p> begin<o:p></o:p> for myrec in c1<o:p></o:p> loop<o:p></o:p> update bill_no set netamt=myrec.netamt where billno=myrec.billno;<o:p></o:p> end loop;<o:p></o:p> commit;<o:p></o:p> end;<o:p></o:p> <o:p> </o:p> and excute this procedure by exec bill_update<o:p></o:p> <o:p> </o:p> Thnaks & regards<o:p></o:p> Mohan<o:p></o:p> <o:p> </o:p> <o:p> </o:p> <o:p> </o:p> ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
