Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day all, I have a simple table with columns for MONDAY, TUESDAYS, WEDNESDAYS, THURSDAYS, FRIDAYS some of the columns have present and absent but now I want to select all Absent from the table...

How can I select Only Absent from the table.

Thanks for your valued time, I really do Appreciate
Posted
Comments
Salman622 2-Oct-13 6:55am    
what is the actual text is it absent or null
Azee 2-Oct-13 9:17am    
Please clear, do you want to get the days where the value is 'absent' or select only that column where value is 'absent'?

1 solution

Hi,
Assuming that your table contains a Column Attendance type of bit and its value will be 1= Present and 0= Absent then the select query will be
SQL
SELECT * FROM dbo.AttendanceDetail WHERE Attendance=0
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900