Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Please help me

$
0
0

Hai everyone, can you help me, how to get COUNT absence if employee was sick,absent,permit in 1 month

i have code like this

 SELECT DISTINCT No_Employee,(SELECT COUNT(Status)FROM DeltaDjaya.dbo.Absensi WHERE Status='Sick')AS S ,(SELECT COUNT(Status)FROM DeltaDjaya.dbo.Absensi WHERE Status='Permit')AS P,(SELECT COUNT(Status)FROM DeltaDjaya.dbo.Absensi WHERE Status='Absent')AS A,(SELECT COUNT(Status)FROM DeltaDjaya.dbo.Absensi WHERE Status='Sick' OR Status='Permit' OR Status='Absent')AS Total FROM DeltaDjaya.dbo.Absensi

but its still wrong ,,,,sorry for bad english

thx for attention


Viewing all articles
Browse latest Browse all 23857

Trending Articles