|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sql query..... Sum of another aggragate functionSELECT Category, COUNT(Labour_ID) AS LabourCount FROM
HR_Labours WHERE (Absconded = '0') AND (VisaCancelled = '0') AND (OnLeave = '0') AND (Terminated = '0') GROUP BY Category here i reading count of labours under this criteria .... as lzbour count ..for each category...but i need the total count means SUM of labourcout[LabourCount ] ... i can i write this as SUM(count(Labour_ID)) or ho i will get the sum... plz help me Philip,
As I understand you right, with a command.executescalar http://msdn2.microsoft.com/en-us/library/system.data.oledb.oledbcommand.executescalar(VS.80).aspx I hope this helps, Cor Show quoteHide quote "Coool.Net" <ismail***@gmail.com> schreef in bericht news:1145866962.257363.183420@t31g2000cwb.googlegroups.com... > SELECT Category, COUNT(Labour_ID) AS LabourCount FROM > HR_Labours > WHERE (Absconded = '0') AND (VisaCancelled = '0') AND (OnLeave = > '0') AND (Terminated = '0') > GROUP BY Category > > > > > here i reading count of labours under this criteria .... as lzbour > count ..for each category...but > i need the total count means SUM of labourcout[LabourCount ] ... > > i can i write this as SUM(count(Labour_ID)) > or ho i will get the sum... > plz help me >
[DATE - newbie] change and set back
GetDirectories Performance Make font Bold Iterate through page controls Register DLL for COM interop How to put a Word/Excel file into a database Impersonation help with SQL 2000 needed Job title: $300 flat for job in perl, cgi, Visual Basic/Asp.Net, whatever online project A Question of form focus - VB.NET 2003 wav files in programs |
|||||||||||||||||||||||