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 / March 2007

Tip: Looking for answers? Try searching our database.

Last

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Everaldo Ricardo - 29 Mar 2007 19:50 GMT
what command in SQL Server  is equable "last" in MS Access?
Sylvain Lafontaine - 29 Mar 2007 20:21 GMT
None.  (And BTW, there is no First() either.)

By using the proper combination of TOP, ORDER BY, DISTINCT, GROUP BY and
Sub-query, you can probably design a query that will give you the same
result with T-SQL as the use of Last() in MS Access.

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)

> what command in SQL Server  is equable "last" in MS Access?
David Portas - 29 Mar 2007 21:14 GMT
> what command in SQL Server  is equable "last" in MS Access?

According to the Access help file, FIRST and LAST return values from
some arbitrary row in your query. Since the correct result is
undefined there perhaps isn't a good answer to your question. A better
question would be, what result did you expect from LAST? Maybe you
could use the MIN or MAX aggregate instead.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
aaron.kempf@gmail.com - 30 Mar 2007 22:44 GMT
yes, min or max work great

you might need to write a where clause and an order by though LoL

On Mar 29, 1:14 pm, "David Portas"
<REMOVE_BEFORE_REPLYING_dpor...@acm.org> wrote:

> > what command in SQL Server  is equable "last" in MS Access?
>
[quoted text clipped - 14 lines]
> SQL Server Books Online:http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
 
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.