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
 SQL Server Development (2000)
 search

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-09-12 : 08:59:21
anandhi writes "i have two columns like this say my orginal table

time           task
----- -----
18:44:18 40
18:39:56 40
18:31:48 37
18:16:11 38
18:15:28 38
17:53:41 37

i have to create a new table as

start_time stop_time
----------- ----------
18:39:56 18:44:18
17:53:41 18:31:48
18:15:28 18:16:11


so i have to read the task column, first value is 40 next search for the same value in the column,if it matches then i save their corresponding time as start and stop time.

how to do this, using stored procedures, if you can help me with samples"
   

- Advertisement -