I have a table Events

Events containing

cardno,time,id,name--each id has a cardno



my requirement is every day each employee swipe the card
several times

i want to calculate first and last time of each card

the output should be

name 1 2
6 7
in out in out
holiday holiday
xxx 09:30 06:30 09:40 06:45
where 1,2...... are dates for example january 1,2, etc. 6
and 7 are saturday and sunday

how it is posssible


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More SQL Server Interview Questions

Explain what is lock escalation?

0 Answers  


How can you list all the columns in a database?

0 Answers  


Explain the difference between delete,drop and truncate in SQL Server?

0 Answers   HCL,


How can I know what locks are running on which resource?

0 Answers  


How to rebuild master databse?

0 Answers  






What is a View ? Can we insert, Update and delete a view?

0 Answers   Arigo Infotech,


How do you make a trace?

0 Answers  


What are the different authentication modes in sql server?

0 Answers  


how to delete duplicate rows from table

9 Answers   CSC,


What types of integrity are enforced by a foreign-key constraint

1 Answers  


Can a function call a stored procedure in sql server?

0 Answers  


How to copy the tables, schema and views from one sql server to another?

0 Answers  


Categories