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
 Other Forums
 MS Access
 display every 4th entry only

Author  Topic 

Reck
Starting Member

1 Post

Posted - 2004-10-11 : 13:36:24
Basically I have a table filled with wavelength and power readings from an optical sensor (sensor is being read every 15 mins) which I'm using to create graphs in Labview.

Plotting a full table takes a ton of time though, so I'm basically in need of a function that displays every 4th entry.

Now my SQL "skill" is crap to say the least, yet I figured "how hard could it be?" and had a go at it. I failed misearbly; 3 hours later and not a single usefull line of code later, I'm turning to you lot.

the main problem is is that the ID of the row doesn't have anything to do with where it is located.

ID Data
5 -60.0dB <-- entry 1
33 -58.3dB <-- entry 2
48 -59-2dB <-- entry 3
55 -58.6dB <-- entry 4

only entry 4 needs to be displayed :/

anyone here who has an idea how to do this?

gpl
Posting Yak Master

195 Posts

Posted - 2004-10-11 : 18:12:31
If the ID has no relation to the time it was recorded, then you have no way of ordering it, the order that rows come out of a select statement (select * from table for example) does not have to return the rows in the order that they were inserted.

Store the time the sample was taken, if it is exactly every 15 mins, then you can extract the minute value from the start of the experiment and only extrat rows holding that minute value (1 sample in 4 at 15 min intervals is hourly)

does this help ?
Graham
Go to Top of Page
   

- Advertisement -