i thing that u have some names with spaces at the beginning use this select to find select substring(upper(fname), count(*) from customer group by 1
Att, Alexis Diel On Sat, Aug 3, 2013 at 5:01 AM, Masotti Umberto <maso...@unich.it> wrote: > ** > > > Field fname is NOT NULL? > count(*) value differs from count(fname) AFAIR. > > Inviato da iPad > > Il giorno 01/ago/2013, alle ore 16:20, "ASOrg" <as...@yahoo.com> ha > scritto: > > > > > Dear All > > > > select count(*) from customer ( returns 235384 ) > > > > select count(*) from customer where substring(upper(fname) from 1 for 1 > ) in ('A','B','C', > > > 'D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') > ( returns 187671 ) > > > > so there are 47.713 records whose fname started with letter A-Z. > > > > select distinct ascii_val(substring(upper(fname) from 1 for 1 )) from > customer where substring(upper(fname) from 1 for 1 ) not in ('A','B','C', > 'D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') > ( returns 0, 13, 46 ) > > > > select count(*) from customer where ascii_val(substring(upper(fname) > from 1 for 1 )) in (0,13,46) ( returns 38197 ) > > > > I don't know how to find the other 9516 records. > > Help please ? > > > > Thank you in advance > > > > > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed] ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/