CATEGORIES
How to fetch a specific record from a table
Published by: Sangeeta (1/27/2009 8:20:03 AM)
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?
Most Popular Articles
- SQL Server 2008 Error: is not a valid login or you do not have permission
- Cannot start .aspx
- what is the difference between Text and String Data type in SQL Server
- Error: Microsoft OLE DB Provider for ODBC Drivers error '80004005'
- Why my MS SQL Server 2005 DSN Connection is not Working
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