Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / May 2008

Tip: Looking for answers? Try searching our database.

Last aggregate function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gus Chuch - 18 May 2008 12:46 GMT
The SQL Last function is to return the last value entered in a record, right?
The follow code will sometimes return the last entered value and sometime
not, why?
SELECT Last(tblEquipment.EquipmentID) AS LastOfEquipmentID
FROM tblEquipment;

Signature

thank You

Douglas J. Steele - 18 May 2008 16:22 GMT
Last doesn't return "the last value entered in a record", it returns "the
last value in a recordset". Since you cannot be sure of the order in which
records are returned if you don't have an ORDER BY clause in your SQL, you
can never be sure what Last will return for your query.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> The SQL Last function is to return the last value entered in a record,
> right?
> The follow code will sometimes return the last entered value and sometime
> not, why?
> SELECT Last(tblEquipment.EquipmentID) AS LastOfEquipmentID
> FROM tblEquipment;
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.