On Wed, May 6, 2009 15:28, Dom wrote: > > Access's FIRST function violates the idea of a set, and I know of no > other database that uses something like it. MS changed the meaning of > FIRST (and of LAST). At one time, it meant the first value of a > resultset, and therefore it was indeterminate -- If you ran the query > twice, you might get different answers. Then later it was changed to > mean the first record that was entered into the database (there is a > timestamp behind each record). So now it is determinate, and you will > get the same answer each time. But generally, it is discouraged. Is > there a chance you can just use MIN or MAX instead? > > > > On Apr 29, 7:53 pm, Rob Wolfe <wolfe....@gmail.com> wrote: >> On Apr 29, 2:56 pm, jmontani <jmont...@gmail.com> wrote: >> >> > Does anyone know what's the equivalence in Oracle of the "first" >> > function used by Access? >> > ie: Select C.PO_NUM, First(C.SHIPMENT_LINE_ID) AS SHIPMENT_LINE_ID >> > FROM C >> >> As I understand it, the Access First() function returns the first >> value of a resultset. It is important to note that in Oracle (or in >> Access even) there is no guarantee that any particular ordering is >> going to exist in the rows of a result set unless there is an explicit >> ORDER BY clause even though for simple one table queries the rows >> USUALLY come out in the same order. >> >> You might want to take a peek at the analytical function First_Value, >> because I think that does about what you >> want.http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/functi... >> >> Another possibility is the use of FIRST in the analytical versions of >> Min or >> Maxhttp://download.oracle.com/docs/cd/B10501_01/server.920/a96540/functi... >> >> Hope this is of some small help >> Rob > > > > So in other words it USED to work as any sane person would expect and now it doesn't?
Awesome, another reason to stay away from toy databases. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en -~----------~----~----~----~------~----~------~--~---