 | 
28-Jul-2006, 08:29 AM
|  | Guest | | | | | | | | | | sorting addresses I am trying to sort a field that is 345 south main street, when I sort the
column of address they appear lowest numeric number first.
How do I convert 345 south main street and so on that is in one field to 2 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12445-sorting-addresses.html
fields: 345; south main street, so that the sort works properly? * Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh! | 
28-Jul-2006, 08:29 AM
|  | Guest | | | | | | | | | | Re: sorting addresses Use two calculated fields in the query as the sort fields. Something like
this:
SELECT * FROM Tablename
ORDER BY Trim(Left([AddressField], InStr([AddressField, " ")-1)),
Trim(Mid([AddressField], InStr([AddressField, " ")+1));
--
Ken Snell Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12445
"sternface" wrote in message
news:C252BA22-B1F6-4003-BCEC-642F8751407C@microsoft.com...
>I am trying to sort a field that is 345 south main street, when I sort the
> column of address they appear lowest numeric number first.
> How do I convert 345 south main street and so on that is in one field to 2 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12445
> fields: 345; south main street, so that the sort works properly? | 
28-Jul-2006, 08:29 AM
|  | Guest | | | | | | | | | | Re: sorting addresses To add to my post, you might have to cast the first part of the field as a
number to get numeric order sorting:
SELECT * FROM Tablename
ORDER BY CLng(Trim(Left([AddressField], InStr([AddressField, " ")-1))), Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12445
Trim(Mid([AddressField], InStr([AddressField, " ")+1));
--
Ken Snell Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12445
"sternface" wrote in message
news:C252BA22-B1F6-4003-BCEC-642F8751407C@microsoft.com...
>I am trying to sort a field that is 345 south main street, when I sort the
> column of address they appear lowest numeric number first.
> How do I convert 345 south main street and so on that is in one field to 2
> fields: 345; south main street, so that the sort works properly? | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | | | | | | | | | | | | | | | Panjabi Today 02:27 AM 11 Replies, 232 Views | | | | | » Books You Should Read... | | | |