Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 minimuma and maximum date

Author  Topic 

vipinjha123
Starting Member

45 Posts

Posted - 2012-05-22 : 06:08:53
Dear All,
how will you find a maximum and minimu date from same column of same days
suppose table login(empid,logintime)
here logintime column contains both login and lgouttime
how will you get both in seperate column
like

empid logintime logouttime
A1025 2012-05-21 10:01:32 2012-05-21 19:01:32

Regards,
Vipin jha

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-05-22 : 06:27:38
yes. How would you separate it ? How do you which which is login and which is logout ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

vipinjha123
Starting Member

45 Posts

Posted - 2012-05-22 : 06:50:06
MINIMUM DATETIME FOR THAT PARTICULAR DAY IS LOGIN AND MAXIMUM DATETIME FOR THE SAME DAY IS LOGOUTTIME
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2012-05-22 : 08:06:27
Duplicate of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=174993

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -