Rank two tables

  • Two tables, PROJECT, SETUP

    PROJECT SETUP Required Output

    Columns

    PROJECT_NUMBERFORUMLA

    109759.16.01FACTD109759.16.01

    109759.16.01.1NULL109759.16.01

    109759.16.04FACTD109759.16.04

    109759.16.04.1NULL109759.16.04

    109759.16.07FACTD109759.16.07

    109759.16.07.1NULL109759.16.07

    109759.16.10FACTD109759.16.10

    109759.16.10.1NULL109759.16.10

    109759.16.11NULL109759.16.10

    109759.16.11.1NULL109759.16.10

    Trying to organize the following above so the required out put is met.

    Two tables, PROJECT and SETUP - Key is PROJECT_NUMBER

    If no SETUP record found then take the previous one found.

    For this example:

    109759.16.11There is no 109759.16.11 so go get the pervious one 109759.16.10

    I tried to use RANKING but this didn't help.

    Any ideas.

  • To help those who can help you please post table definition(s), sample data following the first link in my signature block, which article includes sample code to make the postings as requested very easy.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply