SunQuest
           Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 23rd, 2003, 10:54 AM
alanbmiller alanbmiller is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: San Jose, CA
Posts: 6 alanbmiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Access 97 query

I am a power user of MS applications, but a first time user of Access 97. I have developed a small MS Access 97 application. Each time a client visits, a measurement is taken and recorded in the DB along with the date. I want to compare the first measurement with the last measurement. I can think of many hokey ways of doing this (ie a separate table with first and most recent measurements), but would prefer to use a query. I have discovered, though, that Jet returns random records when First and Last are used. I have sorted visits by date, but cannot reliably retrieve the first reading and the last reading.

Thanks

Reply With Quote
  #2  
Old July 23rd, 2003, 11:34 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
you could try something like this, i know its not the most efficient but it may do the trick.

select top 1 * from table_name order by date_column

select top 1 * from table_name order by date_column desc

that should do it

Reply With Quote
  #3  
Old July 24th, 2003, 06:09 PM
alanbmiller alanbmiller is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: San Jose, CA
Posts: 6 alanbmiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks

Didn't really work. I think I'll need to add a counter (not the ID) that will tell me the order of the visits then sort n select on that. Thanks for the help!

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsDatabasesDatabase Management > Access 97 query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway