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 2000 Forums
 Transact-SQL (2000)
 Table Reading Problem

Author  Topic 

ragh
Starting Member

34 Posts

Posted - 2005-06-22 : 03:51:15
Hi,
I have a table something like this
ID Date Time
1 01/01/05 0900
1 01/01/05 1000
1 01/01/05 1100
2 01/01/05 1200
2 01/01/05 1300

The Problem: I want to read the data in this way....
ID Date InTime OutTime
1 01/01/05 0900 1000
1 01/01/05 1100 0000 (Since no another even row)
2 01/01/05 1200 1300

How can i accomplish this ?
Please help me !!!!


Ragh

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-06-22 : 04:30:22
try this:
http://weblogs.sqlteam.com/jeffs/archive/2005/05/02/4842.aspx

Go with the flow & have fun! Else fight the flow
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-06-22 : 04:32:48
Refer this also
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=51377

Madhivanan

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

ragh
Starting Member

34 Posts

Posted - 2005-06-23 : 00:16:41
Thank you guys....
Since the application will be using MS Access version also, how could i accomplish this ?
so i thought to do this job in front end (VB).
i've done pretty well and working fine, then problem arises only when i dont find even swipe.
ex:
An employee swipes a card when he enter inside and swipes when he goes out, (my code works well here).
suppose he forgets to swipe when he is out or in, ODD Entry (My code Fails here)


help me !

Ragh
Go to Top of Page

jonasalbert20
Constraint Violating Yak Guru

300 Posts

Posted - 2005-06-23 : 00:21:46
Try this...

http://sqlteam.com/item.asp?ItemID=2955

This one helps me a lot with the same problem as yours.

:D

Want Philippines to become 1st World COuntry? Go for World War 3...
Go to Top of Page
   

- Advertisement -