Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008

    Unanswered: How to get data without including it in distinct select

    I want to get some data, from 2 fields, but I don't want to select distinctly by them

    In my tables I have

    Table 1:
    A B TIME

    Table 2:
    A B C D E TIME

    my select is

    select distinct a, max(2.TIME) from 1 , 2, where 1.a = 2.a and 1.TIME > "2008" GROUP by a

    The problem I have is I want to get information about 2.b and 2.c from the fields in this select? is there anyway to do it??? thank you.


  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    You are going to have to be more specific. Give some examples of the raw data and what you want to see in the result set.


  3. #3
    Join Date
    Mar 2008
    Hmm, it was that hard to understand?? I found out how to do it anyway:

    select a, b, c from 2, (select distinct a, max(2.TIME) as MAX from 1 , 2, where 1.a = 2.a and 1.TIME > "2008" GROUP by a) as X where X.a = a AND X.MAX = TIME
    Last edited by dakiar; 03-14-08 at 11:13.

Posting Permissions

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