Forum Replies Created

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

  • RE: Complicated query

    Andy, it works just fine, but you did not include drop_id field in the query. That's where the problems begin...

  • RE: Complicated query

    I got it. Here is the answer:

    SELECT

    Y.record_id,

    Y.sol_number,

    Y.drop_id,

    Y.drop_date FROM

    (

    SELECT

    a.record_id, MIN(a.drop_id) as min_drop_id FROM

    (SELECT m.record_id, d.drop_id

    FROM dbo.MAIN_TABLE m

    INNER JOIN

    (SELECT rec_id, MIN(drop_date) AS drop_date FROM DROPS

    WHERE Drop_Date...

  • RE: Complicated query

    Thanks for the replay. The result of that query is

    168130011997-07-31

    270915002001-01-01

    270920052001-01-01

    371520501997-07-01

    So, we get dupes.

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