home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,745 of 19,505   
   LightBulb to All   
   Sum Only Top 20 Customers?   
   03 Feb 10 14:25:34   
   
   From: lightbulb@nospam.net   
      
   Hi...I need to return the Top 20 customers by 'Accounts Receivable   
   Balance' (= FutureBal + Per1Bal + ... + Per5Bal + Misc_Creds +   
   Unapplied) in the and then in the select list sum a calculated value,   
   Sum(Val1 -Val), and another.   I am stuck on how to use TOP in a WHERE   
   Clause.. TIA LB   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca