If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > SQL equivalent of MS Access "FIRST()" function

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-23-03, 22:55
jbackhus jbackhus is offline
Registered User
 
Join Date: Sep 2003
Location: Houston
Posts: 2
Exclamation SQL equivalent of MS Access "FIRST()" function

I need to know if there is an equivalent to the first() function that is used in MS Access.
Reply With Quote
  #2 (permalink)  
Old 09-24-03, 17:54
Giedre Giedre is offline
Registered User
 
Join Date: Sep 2003
Location: Lithuania
Posts: 4
Re: SQL equivalent of MS Access "FIRST()" function

Quote:
Originally posted by jbackhus
I need to know if there is an equivalent to the first() function that is used in MS Access.
Sorry, I am not very familiar with MS Access, but SQL has such thing:
http://www.csis.gvsu.edu/GeneralInfo...5a.htm#1129681
It's the FIRST() function.
Reply With Quote
  #3 (permalink)  
Old 09-25-03, 07:05
tm_suren tm_suren is offline
Registered User
 
Join Date: Sep 2003
Location: Colombo, Sri Lanka
Posts: 63
Re: SQL equivalent of MS Access "FIRST()" function

standard SQL does not have this as I know. But there are certain delicts provided by dabase vendors to get the first one. This depends on the database you are using.
Reply With Quote
  #4 (permalink)  
Old 09-25-03, 08:51
ScientificLee ScientificLee is offline
Registered User
 
Join Date: Sep 2003
Posts: 21
Re: SQL equivalent of MS Access "FIRST()" function

I have no knowledege on this topic. But I did find a thread on another forum.

http://www.tek-tips.com/gviewthread....184/qid/646291

You might also want to try using a either, TOP, MIN(), MAX(), and/or a combination of the functions.
Reply With Quote
  #5 (permalink)  
Old 09-25-03, 23:29
tm_suren tm_suren is offline
Registered User
 
Join Date: Sep 2003
Location: Colombo, Sri Lanka
Posts: 63
MIN() and MAX() are called aggrigate operations and it is intended to return the minimum value or the maximum value of a certain field, but not the first or the last. TOP is available to restrict the number of records selected from the query, say TOP 10 will only return the first 10 rows.

Cheers,
Suren.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On