it only makes sense if you are sorting by something. Otherwise the order 
in which the records are returned is not guaranteed so the concept of 
first is not meaningful.

however if you are sorting by something then you can use the first_value 
analytic function. There is a very nice example of it at

http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/functions46a.htm#1000828

If, after looking at that example you need more help give us a shout.. i 
am sure someone can help

Rob



Vlad wrote:
> Hi All,
>
> I have some data as follows:-
>
> Employee            Location
> --------------        -------------
> Tom                UK
> James             UK
> Simon             UK
> Bill                 France
> Edward           France
> Chris              France
>
>
> I want to be able to identify each row where there is a new location
> shown - it makes more sense in an example:-
>
> Tom,UK,1 <-- (First new occurenence of UK)
> James,UK,Null
> Simon,UK,Null
> Bill,France,1 <--First occurence of France)
> Edward,France,Null
> Chris,France,Null
>
> Is it possible to do this?
>
> TIA
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to