Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-00907 : missing right parenthesis
On Tue, 23 Nov 2004, alan_at_erols.com wrote:
>>> > make the "set" point, as it did not appear that he
>> >> > This will not answer your question, but you have a bigger
>> >> > issue to solve.
>> >> >
>> >> > The first thing you need to know is that there is no such
>> >> > thing as the "first" or "newest" record unless you have
>> >> > time-dependent data of some kind (E.g., a
>> >> > timestamp). Tables are _sets_ of data, and as such, are
>> >> > technically unordered. There is no guarantee that records
>> >> > will be returned in the same order every time ( know- it
>> >> > sure looks like they are- don't be fooled). Rownum = 1
>> >> > will not do what you need at all. Rownum can be used to
>> >> > reduce the number of records returned, but not to impose
>> >> > or infer an order.
>> >>
>> >> Well, almost. rownum will get him what he wants, as long
>> >> as it operates on the ordered set.
>> >>
>> >
>> > Only if the ordered set is ordered by something that is time
>> > dependent, or by whatever else it is that may be what he
>> > considers "first" (last name, E.g.). Anyway, I was trying to
... order by t2.created ...
-- Galen BoyerReceived on Tue Nov 23 2004 - 17:43:46 CST