Subject RE: [firebird-support] data retrieval
Author jft
Pete,
As Alan suggested below, try select distinct col1, co2 from table ...
John
> -------Original Message-------
> From: Peter Turner <PeterTurner@...>
> Subject: RE: [firebird-support] data retrieval
> Sent: 12 Apr '07 22:29
>
> Mis-typed what we wanted.....meant we wanted rec #1, #2, #4, #5, #6, and
> #7 - skipping #3 and #8
>
> pbt.
>
> -----Original Message-----
> From: [LINK: mailto:firebird-support%40yahoogroups.com]
> firebird-support@yahoogroups.com
> [mailto:[LINK: mailto:firebird-support%40yahoogroups.com]
> firebird-support@yahoogroups.com] On Behalf Of Alan McDonald
> Sent: Wednesday, April 11, 2007 5:38 PM
> To: [LINK: mailto:firebird-support%40yahoogroups.com]
> firebird-support@yahoogroups.com
> Subject: RE: [firebird-support] data retrieval
>
> > hi,
> >
> > have a table with the following conceptual data...
> > rec# col1 col2 ... coln
> > 1 1 d data
> > 2 1 m data
> > 3 1 d data
> > 4 2 d data
> > 5 2 m data
> > 6 3 d data
> > 7 3 m data
> > 8 3 d data
> >
> > trying to come up with a single query that would return unique records
>
> > where the combination of col1 and col2 are unique. in the example,
> > would want rec #1, #2, #3, #4, #6, and #7.
> >
> > have come up with a couple of multiple query ideas, but was wondering
> > how to do this in a single query (if possible).
> >
> > TIA,
> >
> > Pete Turner
> > Sun Nuclear Corp.
>
> but #5 is unique too no?
> Alan
> try a view on ditinct col1, col2
> then join the other data to the view
> Alan
>
> [Non-text portions of this message have been removed]
>
>