Subject | Re: Distinct |
---|---|
Author | Sandor Szollosi |
Post date | 2003-10-30T16:13:33Z |
Thanks Milan,
But unfortunately this is not I'd like.
There are 4 possibilities:
I.
FIELD1, FIELD2
1,1
2,2
II.
FIELD1, FIELD2
1,2
2,2
III.
FIELD1, FIELD2
1,1
2,1
IV.
FIELD1, FIELD2
1,2
2,1
In fact I'd like to get one of these, but I don't know how.
Sandor
--- In firebird-support@yahoogroups.com, Milan Babuskov <albis@e...>
wrote:
But unfortunately this is not I'd like.
There are 4 possibilities:
I.
FIELD1, FIELD2
1,1
2,2
II.
FIELD1, FIELD2
1,2
2,2
III.
FIELD1, FIELD2
1,1
2,1
IV.
FIELD1, FIELD2
1,2
2,1
In fact I'd like to get one of these, but I don't know how.
Sandor
--- In firebird-support@yahoogroups.com, Milan Babuskov <albis@e...>
wrote:
> Sandor Szollosi wrote:
> > FIELD1, FIELD2
> > 1,1
> > 1,2
> > 2,1
> > 2,2
> >
> > Result of
> > "select distinct FIELD1 from TBL1":
> > 1
> > 2
> >
> > and result of
> > "select distinct FIELD1,FIELD2 from TBL1":
> > 1,1
> > 1,2
> > 2,1
> > 2,2
> >
> > But I'd like to get two field in result and only two row.
> > I don't mined which value will show in the second column
>
> I'm not sure if I did quite understand you, but try this:
>
> select distinct FIELD1 from TBL1
> union
> select distinct FIELD2 from TBL1
>
> --
> Milan Babuskov
> http://fbexport.sourceforge.net