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)
 SELECT Statement

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-03-22 : 08:41:34
James Czerniak writes "I need a query to select the most recently inserted set of values from a table. The table has 3 columns. A timestamp, a temperature value, and a humidity value.

I want to select the temperature and humidity value for the most recent timestamp in the table"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-03-22 : 08:41:54
SELECT TOP 1 Temperature, Humidity FROM myTable ORDER BY timestamp DESC
Go to Top of Page
   

- Advertisement -