Last

  • Thread starter Thread starter Everaldo Ricardo
  • Start date Start date
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.
 
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
--
 
yes, min or max work great

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