RSS feed

How to fetch a specific record from a table

Published by: Sangeeta (1/27/2009 8:20:03 AM)

JAN 27 2009

I have a table which contains some data with a primary key pk_id and has a foreign key fk_id. The table somehow looks like this:

pk_id fk_id modified_date modified_info
1 24 01/01/2006 TestInfo
2 24 01/01/2007 TestInfo1
3 24 01/01/2008 TestInfo2
4 24 01/01/2009 TestInfo2

So what I need is to get the last modified_date i.e. ’01/01/2008’ because the the modified_info has not been changed after that date.

Can anyone tell me how can I get the exact and specific value from this table?

 

SQL Server 2008 Error: is not a valid login or you do not have permission >>

<< Identity not in Sync While Exporting Data from SQL Server 2000 to SQL Server 2005 Database

 

COMMENT

Name: admin

Have you tried - select top 1 modified_date from table order by modified_date desc

*Name:
*Comment:
You can use HTML tags here.
*Code: Please enter the sum of 5+2