Subject | Re: FB 2.1 Issue with select distinct |
---|---|
Author | Estie |
Post date | 2008-07-22T13:38:52Z |
--- In firebird-support@yahoogroups.com, Adriano dos Santos Fernandes
<adrianosf@...> wrote:
application to trim the trailing spaces when user input is done. This
will solve the problem.
Regards, Pieter.
<adrianosf@...> wrote:
>but
> Estie escreveu:
> > --- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@>
> > wrote:
> >>> Hi. We have a table with applicants and use the 'select distinct
> >>> (surname) from applicant' to populate a drop-down.
> >>>
> >>> The resulting list includes applicant with a surname "Wilson "
> >>> not "Wilson".your
> >>>
> >>> Any ideas about why this could be? We are using Firebird 2.1 on
> > Windows
> >>> 2003 Server.
> >>> Regards, Pieter
> >> Is the (surname) field a varchar? or char? It might be char in
> > case andor
> >> maybe it should be varchar.
> >> How are the values inserted or updated? via your own interface
> > via ana
> >> external datapump of some kind?
> >> Alan
> >>
> > The (surname) field is varchar(20) using win1252 characterset and
> > collation. The values are entered manually by the applicant or
> > interviewer.
> >
> > How does the distinct verb decide whether a value is distinct in
> > list or not?could
> >
> Accordingly to SQL standard, by default 'Wilson' = 'Wilson '. You
> create and use a NO PAD collation since v2.0.will
>
> create collation win1252_nopad -- you could change this name
> for win1252
> from win1252 no pad;
>
> Using this collation 'Wilson' will be <> 'Wilson ' and hence they
> be distinct.Thank you. If that is the standard then we will modify the
>
> Please note that this feature was not widely tested.
>
>
> Adriano
>
application to trim the trailing spaces when user input is done. This
will solve the problem.
Regards, Pieter.