Re: Grouping by Distinct



What you describe is more like a report than a query
result, but you can produce reports in SQL.  One way
to do it is like this:


select Col1, Col2 from ( select Col1 as hidden1, Col1, min(Col2) as hidden2, min(Col2) as Col2 from T group by Col1 union all select Col1, '', Col2, space(2) + Col2 from T where Col2 <> ( select min(Col2) from T as Tm where Tm.Col1 = T.Col1 ) ) T order by hidden1, hidden2

-- Steve Kass
-- Drew University

PML wrote:

Hi,

I have 2 columns of data, one has an Agent code and the other has information about the Agent. There are duplicates of the Agent code in the 1st column, but different info in the second. For example:

Col 1          Col 2
Agent 1      Data 1
Agent 1      Data 2
Agent 1      Data 3
Agent 2      Data 4
Agent 2      Data 5

Is there a way to only show the Agent once without duplicating it? I dont want to sum or count anything, I just want to show the data like this:

Agent 1     Data 1
               Data 2
               Data 3
Agent 2     Data 4
               Data 5

Does anyone know if this grouping is possible?

Thanks,



.



Relevant Pages

  • Re: Security log ins
    ... They call in the hope of issuing a quote. ... Is the Agent ID the same as the username? ... Or if you have a button they click to produce the report, ...
    (microsoft.public.access.security)
  • Re: (politics) With all this Rove/CIA business heating up...
    ... protect an agent working at a desk in washington. ... you said that it had yet to be proved that wilson lied. ... the conclusions of the committee prove that he did lie. ... report that didn't yet exist and claimed that it said the opposite of what ...
    (rec.music.phish)
  • Re: (politics) With all this Rove/CIA business heating up...
    ... protect an agent working at a desk in washington. ... the conclusions of the committee prove that he did lie. ... the timing is off, and that's the crux of his lying. ... until the final report. ...
    (rec.music.phish)
  • DOJ Report: FBI Misconduct in Jonathan Luna Investigation
    ... Rumors of an affair between Luna and an FBI agent, ... Jennifer Smith Love - that's right, Special Agent Love. ... MD A report by the Department of Justice inspector general's ...
    (alt.true-crime)
  • Re: Required entry
    ... Doug Steele, Microsoft Access MVP ... How do i get the form to producean error report if this is left blank? ... You say you have "a form in which an Agent enters and picks their Agent ...
    (microsoft.public.access.forms)