Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

time find out Expand / Collapse
Author
Message
Posted Monday, September 17, 2012 6:17 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 5:45 AM
Points: 1,288, Visits: 84
Hi,

This is vivek. I have one requirement please let me help.
I have table contain empid,statues,datatimes
1000,IN,17-09-2012 10:10:10
1000,OUT,17-09-2012 11:20:30
'' ,IN,17-09-2012 12:40:30

I want to find out how many hours spent in office(IN).



Post #1360139
Posted Monday, September 17, 2012 9:44 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:05 PM
Points: 13,327, Visits: 12,820
Take a look at this. http://www.sqlservercentral.com/articles/T-SQL/71550/

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1360292
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse