Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Equivalent T-Sql command to Access First()

Status
Not open for further replies.

stnkyminky

Programmer
Oct 15, 2001
476
US
I'm moving queries from Access to Sql server and one of them uses the First() command in the query. I can't seem to find an equivalent in T-Sql. Can someone help out?

Thanks

Scott
Programmer Analyst
<{{><
 
TOP 1 and subquery.

------
heisenbug: A bug that disappears or alters its behavior when one attempts to probe or isolate it
schroedinbug: A bug that doesn't appear until someone reads source code and realizes it never should have worked, at which point the program promptly stops working for everybody until fixed.
 
As data is not stored in any logical order, First does not have any real value (which is why it doesn't exist). If you're using First currently I'm assuming you just want any row, in which case you can use MAX/MIN.

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top