BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL Order By

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases
View previous topic :: View next topic  
Author Message
delphic
Guest





PostPosted: Thu Sep 08, 2005 9:01 am    Post subject: SQL Order By Reply with quote



Hi all,

I am trying to find a way to sort a Query by the first letter of a DB
field. i.e. I have a field called "names", but instead of just using
"Order By names ASC" or "Order By names DESC" I wanted to order by all
the "c"'s then all the "f"'s followed by all the "t"'s etc. etc.

If anyone can give me some much needed guidence, it would be greatly
appreciated.

Adam.

Back to top
pr
Guest





PostPosted: Thu Sep 08, 2005 4:28 pm    Post subject: Re: SQL Order By Reply with quote




"delphic" <lanzafame (AT) bettanet (DOT) net.au> wrote

Quote:
Hi all,

I am trying to find a way to sort a Query by the first letter of a DB
field. i.e. I have a field called "names", but instead of just using
"Order By names ASC" or "Order By names DESC" I wanted to order by all
the "c"'s then all the "f"'s followed by all the "t"'s etc. etc.

If anyone can give me some much needed guidence, it would be greatly
appreciated.


SUBSTRING might do the trick.

PR



Back to top
delphic
Guest





PostPosted: Sat Sep 10, 2005 1:13 am    Post subject: Re: SQL Order By Reply with quote



Thank you very much for your advice. I managed to muck around and
eventually work it out.

Adam.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.