OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
RE: Unusual sort

From: Martin Gainty (mgaintyhotmail.com)
Date: Sat Nov 24 2007 - 09:17:38 CST


Hi Jim
 
it seems that you cannot create an index with a function soyou will need to establish a separate 12 character column which has all of the URL entries insertedalphabetically in ascending order (fully padded with www. prefix)backup your DBALTER TABLE table ADD TwelveCharacterURL CHAR(12),
                  ADD FOREIGN KEY 12CharacterIndex (TwelveCharacterURL);
UPDATE TABLE TABLE set TwelveCharacterURL=(LPAD(OldURLColumn,12,'www.'));
 
Anyone else?
Martin ______________________________________________Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.> From: jjzolx.com> To: mysqllists.mysql.com> Subject: Unusual sort> Date: Fri, 23 Nov 2007 16:29:50 -0700> > I have a table containing web site host names, most of them having both a > "name.com" and "www.name.com" version, that I'd like sorted in the > following manner:> > axxx.com> www.axxx.com> bxxx.com> www.bxxx.com> wxxx.com> www.wxxx.com> zxxx.com> www.zxxx.com> > Any way to do this? > > > -- > MySQL General Mailing List> For list archives: http://lists.mysql.com/mysql> To unsubscribe: http://lists.mysql.com/mysql?unsub=mgaintyhotmail.com>
_________________________________________________________________
Your smile counts. The more smiles you share, the more we donate.  Join in.
www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline