Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8979

Fetching the latest record

$
0
0

Hi,

I have testcycl table which holds the results of tests for each testid and the status with execution date and time as below:

TESTCYCL

TESTID    STATUS  TEST_EXEC_DATE            TEST_EXEC_TIME

1234Passed  01/12/2014 00:00:00        9:00 

1234Failed   01/14/2014 00:00:00        11:00 

1234Passed  01/14/2014 00:00:00        22:00 

456Passed  01/12/2014 00:00:00        9:00 

456Failed   02/14/2014 00:00:00        11:00 

999Passed  01/14/2014 00:00:00        22:00

I need to fetch the latest status of each test id based and date and time of execution.

ie

1234Passed  01/14/2014 00:00:00        22:00 

456Failed   02/14/2014 00:00:00        11:00 

999Passed  01/14/2014 00:00:00        22:00

Please help me abt this. Thanks in advance


Sam


Viewing all articles
Browse latest Browse all 8979


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>