DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: i need to know how to alphabetize

  1. #1
    adam Guest

    i need to know how to alphabetize


    i am doing a database project and we have to alphabetize the entries how do
    i do that???

  2. #2
    Abid Guest

    Re: i need to know how to alphabetize


    i think u need to sort ur entries apply any sorting algo to sort ur data
    (ur problem is not exactly clear to me)


    "adam" <adamj2000@hotmail.com> wrote:
    >
    >i am doing a database project and we have to alphabetize the entries how

    do
    >i do that???



  3. #3
    Danny Kalev Guest

    Re: i need to know how to alphabetize

    you can use std::sort() or qsort() to sort the entries, assuming they
    are strings.

    Danny

    adam wrote:
    >
    > i am doing a database project and we have to alphabetize the entries how do
    > i do that???


  4. #4
    jonnin Guest

    Re: i need to know how to alphabetize


    You may want to set all to the same case, else z > A or Z > a (i forget which).
    toupper /tolower can do this. Unless std knows to do this for strings,
    not sure...

    Danny Kalev <dannykk@inter.net.il> wrote:
    >you can use std::sort() or qsort() to sort the entries, assuming they
    >are strings.
    >
    >Danny
    >
    >adam wrote:
    >>
    >> i am doing a database project and we have to alphabetize the entries how

    do
    >> i do that???



  5. #5
    Danny Kalev Guest

    Re: i need to know how to alphabetize



    "Michael (michka) Kaplan" wrote:
    >
    > In addition, there are lots of locale-specific issues (how a Turkish user
    > would expect to treat "I" or how a Lithuanian user would want to sort "Y",
    > etc.
    >
    > Although I do not know of any databases that do not already handle sorting
    > themselves -- thus making all of this work unneeded, unless the original
    > poster can explain why they are trying to redo a fundamental feature of
    > every database? :-)


    Actually, I was thinking about it too: SQL can sort records without any
    effort. However, I wasn't sure the OP really meant a relational database
    system (it appears that he was implementing a DBMS by himself, as a
    project, unless I misunderstood). In either case, qsort() or std::sort()
    applied to a sequence of strings can do the trick easily. If the strings
    are in a language other than English, one has to prepare an appropriate
    comparitor but that's a different issue.

    Danny
    >
    > --
    > MichKa
    >
    > the only book on internationalization in VB at
    > http://www.i18nWithVB.com/
    >
    > "jonnin" <jonnin@vol.com> wrote in message news:3b0b955d$1@news.devx.com...
    > >
    > > You may want to set all to the same case, else z > A or Z > a (i forget

    > which).
    > > toupper /tolower can do this. Unless std knows to do this for strings,
    > > not sure...
    > >
    > > Danny Kalev <dannykk@inter.net.il> wrote:
    > > >you can use std::sort() or qsort() to sort the entries, assuming they
    > > >are strings.
    > > >
    > > >Danny
    > > >
    > > >adam wrote:
    > > >>
    > > >> i am doing a database project and we have to alphabetize the entries

    > how
    > > do
    > > >> i do that???

    > >


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center