logo       

RE: Supporting help ....: msg#00007

java.enhydra.general

Subject: RE: Supporting help ....

Hi!
 
I'm not sure, but I think it's not posible to solve this with one query.
I think you need 3.
 
select EmpNo, count(*)
from exampleTable
where Status = "Present"
group by EmpNo
 
select EmpNo, count(*)
from exampleTable
where Status = "Absent"
group by EmpNo
 
etc.
 
Greetings
Thorsten
 
 
-----Original Message-----
From: enhydra-admin@xxxxxxxxxxx [mailto:enhydra-admin@xxxxxxxxxxx] On Behalf Of G.K.M. Shafiul Alam Bhuiyan
Sent: Sunday, February 02, 2003 7:44 AM
To: 'enhydra@xxxxxxxxxxx'; 'enhydra@xxxxxxxxxxx'; 'enhydra@xxxxxxxxxxx'; enhydra@xxxxxxxxxxx
Subject: Enhydra: Supporting help ....

 
I am facing some problem. Please help me ! I have a attendance table, Every day i entry employee present and absent time and one status column to maintain employee's present or absent status.
 
I entry one month data at that table and I wish to write a query , that can show individual employee record with in one row..as like this example table ....
 
My Actual Table
 
EmpNo                 Name             Status            Date
-----------                ---------            ----------            ---------
1000                    Mr. Joy            Sick Leave        01-Jan-03
1000                    Mr. Joy            Present             02-Jan-03
1000                    Mr. Joy            Absent             03-Jan-03
1000                    Mr. Joy            Present             04-Jan-03
 
 
My SQL query should be display ....
 
 
EmpNo                 Name             Present            Absent             Sick Leave    
-----------                ---------            ----------            -----------            --------------
1000                    Mr. Joy            2                    1                    1
 
 
Please, Help me " How can i write this type of SQL Query "
 
 
Thanks and Beast Regards ...
 
G.K.M. Shafiul Alam Bhuiyan
    (Computer Programmer)
_______________________________________________ Enhydra mailing list Enhydra@xxxxxxxxxxx http://www.enhydra.org/mailman/listinfo.cgi/enhydra
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise