select one records from each group

  • I conceed Noel.  The repeated use of MAX isn't right.  Your query is better.

    Francis

  • Let's just hope he has QA to catch up bugs, or that it's just a school homework...

  • Better might be a strong word here. We still don't know the requirement of the query are and we're ready to close down this thing. Maybe we're getting ahead of ourselves.

  • I don't think so Sushila.

    I guess we'll hear again from this guy today .

  • Agree with Remi here. We STILL don't know what was actually needed

     


    * Noel

  • Remi - read through the second half of my response (you're NOT paying attention!!)...

    I've said that Jay's requirements and table def could actually work with Francis' solution!







    **ASCII stupid question, get a stupid ANSI !!!**

  • I don't think so I believe he didn't payed attention because of the fact that names returned had some sence. Pretty sure he'll be back, just not when


    * Noel

  • How likely is that, a flawed query that works on flawed design with flawed data with flawed lookup of the answer?? If you reread what I said, I said "I don't think so", not "it's not possible". But this is starting to be a moo point, so I'll go have some lunch. L8r.

    On second thaught that might be very possible .

  • Looks like we are thinking in the same line today

     


    * Noel

  • thank you for everyone's help.  the query from fhanlon was indeed had some problems. 

    I used the one provided by noeld and it worked fine.

  • Cool. Could you please provide the required information next time so that we don't have to guess again? That way we can provide a tested solution in far less time. Everyone gains from this.

  • hth


    * Noel

  • There is one significant (potential) problem with this query. Max(emp_id), max(fname), max(lname) and max(job_lvl) could all be from different rows in the table; they're _probably_ not going to be from the same row.


    --Mitch

  • We know that... the 2nd page of posts is all about that.

  • Yes - it was when Noel pointed out the exact same flaw that started off the whole discussion...and led me to help another user with a similar problem....







    **ASCII stupid question, get a stupid ANSI !!!**

Viewing 15 posts - 16 through 29 (of 29 total)

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