Click here to Skip to main content
15,905,323 members
Home / Discussions / Database
   

Database

 
GeneralRe: JET download Pin
Graham Bradshaw26-Jun-04 14:16
Graham Bradshaw26-Jun-04 14:16 
GeneralSQLXML & Default parameters Pin
RichardGrimmer22-Jun-04 22:30
RichardGrimmer22-Jun-04 22:30 
GeneralSql Server does not exists or acces denied Pin
pdnitin22-Jun-04 21:09
pdnitin22-Jun-04 21:09 
GeneralRe: Sql Server does not exists or acces denied Pin
Thea Burger22-Jun-04 21:16
Thea Burger22-Jun-04 21:16 
Generalcheck for the duplicate data Pin
viviansm21-Jun-04 20:06
viviansm21-Jun-04 20:06 
GeneralRe: check for the duplicate data Pin
Wilbur J. Pereira21-Jun-04 22:11
Wilbur J. Pereira21-Jun-04 22:11 
GeneralRe: check for the duplicate data Pin
VenkatFor.NET22-Jun-04 3:06
VenkatFor.NET22-Jun-04 3:06 
GeneralPulling the SECOND latest readings for ALL properties in a table! Pin
lostsheep00721-Jun-04 19:48
lostsheep00721-Jun-04 19:48 
I have a problem that's an extension of one I was helped with before -hope someone can help!

A table (wm7_raw_spl_data)
Fields;
propertyID
date_2016_all (date field)
day_reading
night_reading

This table contains loads of readings for all properties. Each day/night reading is a separate record. The only way to separate records for a property is by the date the readings were calculated on.

So.. I want to choose the latest rundata for all properties. Properties are run off and rerun ad hoc, i.e. NOT all at the same time.

I did this like so:

SELECT *
FROM dbo.wm7_raw_spl_data INNER JOIN
(SELECT propertyID AS property_id2, MAX(date_2016_all) AS assessmentdate
FROM dbo.wm7_raw_spl_data
GROUP BY propertyID) wm7_raw_spl_data_1 ON dbo.wm7_raw_spl_data.date_2016_all = wm7_raw_spl_data_1.assessmentdate AND
dbo.wm7_raw_spl_data.propertyID = wm7_raw_spl_data_1.property_id2


OK! I now have a view I can use this to get the latest readings for all properties.

Now I want create a view to choose the 2nd latest run data for all properties...

Any help would VERY gratefully received. I'm having to do a big comparison of data and this is a basic requirement for the process.....

Patrick

Everything & Nothing
http://www.lostsheep.com
GeneralRe: Pulling the SECOND latest readings for ALL properties in a table! Pin
Michael Potter22-Jun-04 6:16
Michael Potter22-Jun-04 6:16 
GeneralPassword protection and Access Pin
Guinness4Strength21-Jun-04 14:21
Guinness4Strength21-Jun-04 14:21 
GeneralRe: Password protection and Access Pin
Mike Ellison21-Jun-04 14:27
Mike Ellison21-Jun-04 14:27 
GeneralRe: Password protection and Access Pin
Guinness4Strength21-Jun-04 16:27
Guinness4Strength21-Jun-04 16:27 
GeneralRe: Password protection and Access Pin
Guinness4Strength21-Jun-04 16:30
Guinness4Strength21-Jun-04 16:30 
GeneralRe: Password protection and Access Pin
Mike Ellison22-Jun-04 5:45
Mike Ellison22-Jun-04 5:45 
Generalvariables in sql statement Pin
Member 54508121-Jun-04 8:13
Member 54508121-Jun-04 8:13 
GeneralQuestion on updating multiple tables thru DataGrid Pin
Flack21-Jun-04 7:02
Flack21-Jun-04 7:02 
Generaltable name as a string Pin
si_6921-Jun-04 1:14
si_6921-Jun-04 1:14 
GeneralRe: table name as a string Pin
Steven Campbell21-Jun-04 2:57
Steven Campbell21-Jun-04 2:57 
GeneralRe: table name as a string Pin
VenkatFor.NET21-Jun-04 3:01
VenkatFor.NET21-Jun-04 3:01 
QuestionDifference between Providers and drivers?? Pin
Anonymous20-Jun-04 20:15
Anonymous20-Jun-04 20:15 
AnswerRe: Difference between Providers and drivers?? Pin
Karthikeyan Muthurajan20-Jun-04 23:15
Karthikeyan Muthurajan20-Jun-04 23:15 
AnswerRe: Difference between Providers and drivers?? Pin
Steven Campbell21-Jun-04 2:54
Steven Campbell21-Jun-04 2:54 
GeneralStoring images in SQL server and Display Pin
gangigangi20-Jun-04 16:18
gangigangi20-Jun-04 16:18 
GeneralRe: Storing images in SQL server and Display Pin
Grimolfr28-Jun-04 8:39
Grimolfr28-Jun-04 8:39 
GeneralStoring aobjects into SQL Server table Pin
Diego F.20-Jun-04 1:04
Diego F.20-Jun-04 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.