Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Posts
    21

    Unanswered: Query help - rank? join? Not sure how to accomplish

    Hey folks! So here is the issue. I have a table which contains submissions and approvals. There are three submission types: A, B, and C. There is only one approval type, APP. Each record has a primary key fed from a sequence and a date. See the attached word file for an example.

    My question is this:

    I want to find the date of the most recent APP record where the earliest (A,B,C) record PRIOR to the APP record is B. To make things more complicated there are other types other than A,B,C and APP which I need to ignore.

    How do I construct SQL to pull this? Thanks!
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Please paste your example. Most of the people on this forum will never open a binary file.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Dec 2007
    Posts
    9
    I think I understand what you are asking - but just in case - from your example - if you would run a query using that table, what would your desired output be (). Also you should add some of the other data that is going to complicate it. Sorry for the quesitons, but I want to make sure I help you the best way I can.

Posting Permissions

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