Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    12

    Unanswered: FIRST / LAST / MIN / MAX in PL/SQL for Oracle 8i

    I'm trying to do the equivalent of an MS-Access FIRST, LAST, MIN and MAX operator in an Oracle 8i Stored Procedure.

    My query in Access looked something like

    "Select FIRST(a), LAST(b), MIN(y), MAX(z) from myTable"

    Any ideas?

  2. #2
    Join Date
    Oct 2003
    Posts
    12

    Ok got the 'FIRST' bit sorted

    using something like

    select col1 into my_variable from
    ( select col1,
    row_number() over (order by col2, col3 desc) r
    from table1 )
    where
    r = 1;

  3. #3
    Join Date
    Sep 2003
    Location
    The Netherlands
    Posts
    311
    hi,

    for correct answers, please tell us non-access users, what the functions do in access ? When u've done it, we might be able to tell u the oracle equivalents.

    greetz
    Edwin van Hattem
    OCP DBA / System analyst

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •