-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: s_hashim
Message 4 in Discussion


select inv.orderid,inv.quantity,
(select sum(quantity) from invoices 
where orderid=inv.orderid) 
from invoices inv,invoices invn 
where 
inv.orderid=invn.orderid
group by inv.orderid,inv.quantity
order by 
inv.orderid

  -----Original Message-----
From: BalajiKrishnan 
  [mailto:[EMAIL PROTECTED]
Sent: Friday, December 26, 2003 3:57 
  PM
To: BDOTNET
Subject: Sql 
  query


  
    
      
      New Message on BDOTNET
    
      

  Sql 
    query


    
      
      
        Reply

        
          
            
            
               
              Reply to Sender   Recommend 
              Message 1 in 
                Discussion 
      
        
          
            
            
              From: BalajiKrishnan 

            
              

                Hi all,
                 
                I want a query
                 
                I have a table which has three fields
                 
                
                
                  
                    Billno 
                     ItemAmt
                     NetAmt
                  
                     101
                     30
                     
                  
                     101
                     70
                     
                  
                    102
                     10
                     
                  
                     102
                     20
                     
                  
                     102
                     30
                     
                 
                So i need to update the value NetAmt as sum(itemAmt) group 
                by billno.
                 
                so the result should be
                 
                
                
                
                  
                    Billno 
                     ItemAmt
                     NetAmt
                  
                     101
                     30
                     100
                  
                     101
                     70
                     100
                  
                    102
                     10
                     60
                  
                     102
                     20
                     60
                  
                     102
                     30
                     60
                 
                Thanks
                Balaji
View other groups in this 
    category. 



-----------------------------------------------------------

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]

Reply via email to